Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
{
}
}
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.