Hi Guys,
In more and more of my functions (althought they still work) i'm getting a warning the function doesn't return a value on all code paths.
for example:
vb.net Code:
Function functionLoadHiddenFields(ByVal fileLocation As String, ByVal Y As Integer) '// Check if the file exists If File.Exists(fileLocation) Then '// Load the xml document Dim XMLDoc As New Xml.XmlDocument '// Find and load the XML file XMLDoc.Load(fileLocation) '// Tell where to look for the data we need Dim XMLItem As Xml.XmlNode = XMLDoc.SelectSingleNode("hiddenFields/hiddenValues") 'MessageBox.Show((XMLItem.Attributes("hiddenFieldsID" & (Y)).InnerText)) Return XMLItem.Attributes("hiddenFieldsID" & (Y)).InnerText End If End Function
if i put in the return false it wouldn't show the message, is it basically a way of saying:
if expression true do this, return true, else return false
i know in PHPO for example i can just return either true, or a value.
thanks for any info guys
Graham




Reply With Quote