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.
Cannot create an instance of the abstract class or interface 'interface'
You cannot create an instance of an abstract class or an interface. For more information, see Interfaces.
The following sample generates CS0144:
// CS0144.cs
interface MyInterface
{
}
public class MyClass
{
public static void Main()
{
MyInterface myInterface = new MyInterface (); // CS0144
}
}
How to fix violations
You can solve this problem by implementing one of the two following solutions:
Change the type declaration so that it's not abstract: Either remove the abstract keyword from the class declaration, or change the type from an interface to a class.
Create a type that's derived from the abstract class or that implements the interface.
Povratne informacije za .NET
.NET je projekat otvorenog koda. Izaberite vezu da biste pružili povratne informacije: