Hi there,
Having a problem trying to create a function, as part of a BizTalk helper class that returns a value of type (Microsoft.XLANGs.BaseTypes.XLANGMessage). The function code is as follows:
public XLANGMessage UpdateXML (XLANGMessage inputFile)
{
XmlDocument xDoc = new XmlDocument();
XLANGMessage outputFile;
xDoc = (System.Xml.XmlDocument) inputFile[0].RetrieveAs(typeof(System.Xml.XmlDocument));
// Modify xDoc document code here
outputFile[0].LoadFrom(xDoc.ToString());
return outputFile;
}
This code does not build as I receive an error stating "Use of unassigned local variable 'outputFile'. I have tried to initialize the 'outputFile' using the new keyword ( = new ....), but that also results in a build error.
What am I doing wrong?