我收到此錯誤object reference is required on clindID in the submethod
爲什麼我無法訪問子類中的字符串clientID方法?我想用多種方法來使用它。級別變量?
class Remote
{
public string clientID
{
set{} get { return this.clientID; }
}
public bool validClientId()
{
clientID="32";
return true;
}
// closing bracket?
或者它會更好地使用
string clientID="";
不工作,要麼
...以及您得到了哪些錯誤? – 2014-11-06 17:43:26
你的意思是不工作你可以顯示正確的類代碼它看起來不完整代碼 – 2014-11-06 17:44:16
對象引用是必需的在子方法 – mountaindweller 2014-11-06 17:44:20