I have the following class but I can't seem to get the desired results with C#.
public class AppOsType {
public static class IOS {
public static int IOS()
{
return 100;
}
public static string ToString()
{
return "iOS";
}
}
... // additional values
}
I want to get the following results:
AppOsType.IOS // returns 100
AppOsType.IOS.ToString() // returns "iOS"
But I'm getting an error saying AppOsType.IOS is a type when i do the following:
Assert.AreEqual(100, AppOsType.IOS);
What am I missing?
Edit: left out static.