We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

JS1245: A non-static member cannot be accessed with the class name

The code is attempting to access a non-static class member by using the class name. Only static class members are associated with the class itself; non-static members are associated with and accessed through a particular class instance.

To correct this error

  • Make sure that non-static members are accessed with a class instance.

Show: