Saturday, April 18, 2015

Did you know you may use const values in an abstract class kind of like static values in a static class in C#?

public abstract class Stuff
{
   public const string Foo = "Bar";
   public const string Baz = "Qux";
}

 
 

The above should let you do something like this:

string foo = Stuff.Foo;

No comments:

Post a Comment