this is the code:
// created on 5.7.2002 at 10:47
public class Test
public struct Car
public int year;
Car mycar = new Car();
public static void Main()
public void mytest()
and I got such error: An object reference is required for the nonstatic field, method, or property 'Test.mycar'
So I have to declare another Car mycar = new Car();
in static void Main() function to solve this problem,
so is there any way so that I declare Car mycar = new Car();
once and use it in both functions: void main() and void mytest().