There is an error showing at this line on execution:
((IPEndPoint)(TcpClient.Client.RemoteEndPoint)).Address;
the eroor is:
An object reference is required for the nonstatic field, method, or property
System.Net.Sockets.TcpClient.Client.get ...
What is solution for this error?
The code is shown below.
//Assume myList is an ArrayList
IPAddress tempAddress = ((IPEndPoint)(TcpClient.Client.RemoteEndPoint)).Address;
myList.Add(tempAddress);