Hey there
This might be a stupid question, but I don't get why i cant do this
string SteamPath;
XmlDocument LoadDoc = new XmlDocument();
LoadDoc.Load("Config.xml");
XmlElement rootless = LoadDoc.DocumentElement;
if (rootless.Attributes["SteamPath"].Value == "")
{
}
else
{
SteamPath = rootless.Attributes["SteamPath"].Value;
}
return SteamPath;
It gives me the error "Use of unassigned local variable 'Steam Path'" of course that makes sense, since its under the same code as where its declared, but i just dont get why it has to be like that? How else should i do this?
Sorry if this is a stupid question, i was just wondering why it was like this :)
Cheers
-jaz