Thursday, 12 September 2013

Cannot return value from main

Cannot return value from main

**static string Main(string[] args)
{
//IPAddress ipAddress = System.Net.IPAddress.Loopback;
IPAddress ipAddress = IPAddress.Parse("192.168.0.100");
IPEndPoint localEndPoint = new IPEndPoint(ipAddress, 1515);
Socket sock = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp);
Connect(localEndPoint, sock);
string packet;
packet = Console.ReadLine();
packet += "<EOF>";
Send(sock, packet);
Receive(sock);
return packet;
//connectDone.WaitOne();
}**
This is me Client mail section, when i try to return my string from my
server respond (packet variable) the compiler error Program '...\clie.exe'
does not contain a static 'Main' method suitable for an entry point

No comments:

Post a Comment