Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
'property' : property or indexer must have at least one accessor
A property must have at least one accessor (get or set) method.
For more information, see and Using Properties.
Example
The following sample generates CS0548.
// CS0548.cs
// compile with: /target:library
public class b
{
public int MyProp {} // CS0548
public int MyProp2 // OK
{
get
{
return 0;
}
set {}
}
}
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.