Bilješka
Pristup ovoj stranici zahtijeva provjeru vjerodostojnosti. Možete pokušati da se prijavite ili promijenite direktorije.
Pristup ovoj stranici zahtijeva provjeru vjerodostojnosti. Možete pokušati promijeniti direktorije.
The modifier 'abstract' is not valid on fields. Try using a property instead
You cannot make a field abstract. You can, however, have an abstract property that accesses the field.
Example 1
The following sample generates CS0681:
// CS0681.cs
// compile with: /target:library
abstract class C
{
abstract int num; // CS0681
}
Example 2
Try the following code instead:
// CS0681b.cs
// compile with: /target:library
abstract class C
{
public abstract int num
{
get;
set;
}
}
Sarađujte s nama na GitHub-u
Izvor za ovaj sadržaj može se naći na usluzi GitHub, gdje takođe možete da kreirate i pregledate probleme i povučete zahtjeve. Za više informacija pogledajte naš vodič za saradnike.