Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

Compiler Error CS0426

Updated: October 2008

The type name 'identifier' does not exist in the type 'type'

This error occurs when you reference a type nested within another type, but no such nested type exists. This can occur if you mistype the name of the nested type. Check the spelling of the names used, and verify that the enclosing type has the expected member.

The following sample generates CS0426 because class C has no nested type A:

// CS0426.cs

class C
    // No nested types are declared.   

class D
   public static void Main()
       C c = new C();
       // Attempt to reference a nested type A:
       C.A a; // CS0426 because no such type C.A




October 2008

Changed explanatory text and example.

Customer feedback.

Community Additions

© 2015 Microsoft