Example:
[b]try[/b]
[b]{[/b]
TcpClient [b]client[/b] = worldListener.AcceptTcpClient(); // [b]client[/b] is created
[b]}[/b]
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
Console.WriteLine("[INFO] " + LoggingFunctions.GetDateTime() + " New connection from " + [b]client[/b].Client.RemoteEndPoint); //give "The name 'client' does not exist in the current context"
but works if the try catch block is removed. Would be helpful if you could give me an explanation and give me a solution.

New Topic/Question
Reply
MultiQuote









|