Napomena
Pristup ovoj stranici zahteva autorizaciju. Možete pokušati da se prijavite ili da promenite direktorijume.
Pristup ovoj stranici zahteva autorizaciju. Možete pokušati da promenite direktorijume.
The Conditional attribute is not valid on 'method' because it is an override method
The ConditionalAttribute attribute is not allowed on a method that is marked with the override keyword. For more information, see Knowing When to Use Override and New Keywords.
The compiler never binds to override methods. It only binds to the base method, and the common language runtime calls the override, as appropriate.
The following code generates CS0243:
// CS0243.cs
// compile with: /target:library
public class MyClass
{
public virtual void M() {}
}
public class MyClass2 : MyClass
{
[System.Diagnostics.ConditionalAttribute("MySymbol")] // CS0243
// remove Conditional attribute or remove override keyword
public override void M() {}
}
Povratne informacije za .NET
.NET je projekat otvorenog koda. Izaberite vezu da biste pružili povratne informacije: