Hi
I have a function below of which I want to make the second param a generic so I could pass in different data types.
private string GetElementText(ref XmlReader xmlReader, ref string nodeValue)
{
if (xmlReader.IsStartElement())
{
// Read to get the first child of the node
// and make sure it has no name
xmlReader.Read();
if (string.IsNullOrEmpty(xmlReader.Name))
{
nodeValue = FormatNodeValue(xmlReader.Value);
}
}
else
{
//By passing in nodeValue, if end of element then we donot overwrite it.
}
return nodeValue;
}
Thanks inadvance.
I have a function below of which I want to make the second param a generic so I could pass in different data types.
private string GetElementText(ref XmlReader xmlReader, ref string nodeValue)
{
if (xmlReader.IsStartElement())
{
// Read to get the first child of the node
// and make sure it has no name
xmlReader.Read();
if (string.IsNullOrEmpty(xmlReader.Name))
{
nodeValue = FormatNodeValue(xmlReader.Value);
}
}
else
{
//By passing in nodeValue, if end of element then we donot overwrite it.
}
return nodeValue;
}
Thanks inadvance.