Visual C# - Class methods?
I've been learning Visual C# 2010 for a day now. I've had about a year of
experience with objective-c/xcode. In obj-c there are Class methods and
Instance methods. I've figured out how to do instance methods in C# but
how do you run (and make) a class method? The closest i have so far is
this:
new Mode().selectScenario();
//and further below...
class Mode
{
public string selectScenario()
{
return "select scenario";
}
public string enterToFind()
{
return "enter to find";
}
}
What i am trying to do here is return a string when i do
Mode.selectScenario() or something. In objective-c I would use [Mode
selectScenario] but I'm not sure about C#. Thanks
No comments:
Post a Comment