This should be a simple one. I don't get what's going on here.
I have a public "Utility" class that I use to group some routine functions in my app so they aren't repeated in full every place I need to use them.
For example. My app's webserver information could change over time, so instead of hardcoding it every place I need to use it, I have placed the information in my resources file.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">ListViewTest</string>
<string name="prod_prompt">Select Product</string>
<string name="title_state">Select State</string>
<string name="serveraddress">mywebserver.com</string>
<string name="appdir">applicationdirectory</string>
</resources>
Then what I want to do is put the string together with this...
public class Utilities
{
public static string ServerInfo() {
string Server = Resource.String.serveraddress.ToString();
string AppDir = Resource.String.appdir.ToString();
string BaseURL = "http://" + Server + "/" + AppDir + "/";
return BaseURL;
}
}
It compiles, but when displayed in my app, it shows the integer values from Resource.designer.cs instead of the string values.