Export (0) Print
Expand All
Expand Minimize

Compiler Error CS0610

Field or property cannot be of type 'type'

There are some types that cannot be used as fields or properties. These types include System.ArgIterator and System.TypedReference.

The following sample generates CS0610 as a result of using System.TypedReference as a field:

// CS0610.cs
public class MainClass
   System.TypedReference i;   // CS0610
   public static void Main ()

   public static void Test(System.TypedReference i)   // OK

Community Additions

© 2015 Microsoft