This documentation is archived and is not being maintained.
Compiler Error CS0670
Field cannot have void type
A field was declared to be of type void.
The following sample generates CS0670:
void f; // CS0670
// try the following line instead
// public int f;
public static void Main()
C myc = new C();
myc.f = 0;