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.
'member': static classes cannot contain protected members
This error is generated by declaring a protected member inside a static class.
Example
The following example generates CS1057.
// CS1057.cs
using System;
static class Class1
{
protected static int x; // CS1057
public static void Main()
{
}
}
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.