Why can't I use 'this.' in C# to access my class constant?
Asked 2011-04-05T14:31:14.040
9
In C# .NET, why can't I access constants in a class with the 'this' keyword?
Example:
public class MyTest
{
public const string HI = "Hello";
public void TestMethod()
{
string filler;
filler = this.HI; //Won't work.
filler = HI //Works.
}
}