Share via


Compiler Error CS0138

A using namespace directive can only be applied to namespaces; 'type' is a type not a namespace

A using directive can only take the name of a namespace as a parameter. For more information, see Namespaces (C# Programming Guide).

The following sample generates CS0138:

// CS0138.cs
using System.Object;   // CS0138