B
Ben S. Terry
Can someone please tell me how to declare a static variable in a function?
The following generates a compiler error:
public class MyClass
{
public void MyFunc()
{
static int i; // Compiler error: Invalid expression term 'static'
}
}
The following generates a compiler error:
public class MyClass
{
public void MyFunc()
{
static int i; // Compiler error: Invalid expression term 'static'
}
}