Avviso del compilatore (livello 3) CS0693

Aggiornamento: novembre 2007

Messaggio di errore

Il parametro di tipo 'parametro tipo' ha lo stesso nome del parametro del tipo outer 'tipo'.
Type parameter 'type parameter' has the same name as the type parameter from outer type 'type'

This error occurs when you have a generic member such as a method inside a generic class. Since the method's type parameter is not necessarily the same as the class's type parameter, you cannot give them both the same name. Per ulteriori informazioni, vedere la classe Metodi generici (Guida per programmatori C#).

Per evitare questa situazione, assegnare un nome diverso a uno dei parametri di tipo.

Esempio

Il seguente codice di esempio genera l'avviso CS0693.

// CS0693.cs
// compile with: /W:3 /target:library
class Outer<T>
{
   class Inner<T> {}   // CS0693
   // try the following line instead
   // class Inner<U> {}
}