Put one more }
at the end of the file. From where i can see the namespace is never closed.
EDIT:
Problem with the variable. You can solve this by doing as following to access it in the method.
class Program
{
//Declare the variable here:
private static TextWriter transportLogFile;
public static void Main(string[] args)
{
//TextWriter transportLogFile = null;
transportLogFile = writer;
}
private static void MyMethod()
{
//Access transportLogFile here.
}
}
6
solved C# error (on monitoring bytes received/sent) [edited] [closed]