C# Error CS1537 – The using alias ‘{0}’ appeared previously in this namespace

C# Error

CS1537 – The using alias ‘{0}’ appeared previously in this namespace

Reason for the Error & Solution

The using alias ‘alias’ appeared previously in this namespace

You defined a symbol twice as an alias for a namespace. A symbol can only be defined once.

The following sample generates CS1537:

// CS1537.cs  
namespace x  
{  
   using System;  
   using Object = System.Object;  
   using Object = System.Object;   // CS1537, delete this line to resolve  
   using System = System;  
}  

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

C# Compiler Error CS0442 – ‘Property’: abstract properties cannot have private accessors Reason for the Error You’ll get this error...
This is a really simple one . Below is a simple example of an enum called “Designation” defined with the...
This blog post explain the usage of the Checked Block in .NET and how you can use them in Visual...