有一個錯誤在該行上執行顯示ip地址檢索
An object reference is required for the nonstatic field, method, or property
System.Net.Sockets.TcpClient.Client.get ...
,這是什麼錯誤的解決方案?
代碼如下所示。
//Assume myList is an ArrayList
IPAddress tempAddress = ((IPEndPoint)(TcpClient.Client.RemoteEndPoint)).Address;
myList.Add(tempAddress);
你想獲取IP地址?本地機器? – jerryjvl 2009-06-26 08:50:16