在C#.NET中,爲什麼我無法使用'this'關鍵字訪問類中的常量?爲什麼我不能使用'this'。在C#中訪問我的類常量?
實施例:
public class MyTest
{
public const string HI = "Hello";
public void TestMethod()
{
string filler;
filler = this.HI; //Won't work.
filler = HI //Works.
}
}
今天上午有人是迅速。哈哈。 – 2011-04-05 14:34:17
@Justin Niessner:你在跟蹤我嗎? – BoltClock 2011-04-05 14:34:39
不......但我在看到某些內容已發佈時自己正在輸入答案。 – 2011-04-05 14:35:09