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.

See Also

Reference

static Modifier

Concepts

Troubleshooting Your Scripts

Other Resources

JScript Reference

Class-based Objects