Instance members vs static members

An instance member is created during the application. The static member is a value that is automatically created and stored throughout the life of the program. Let’s start by creating a class.

Now let’s add a static value.

To access the values, you need to access them like this — for the class items, they are access by their name which can then relay their value. For the static item, you have to access the class then the value.

We can then use the static variable sort of like a inventory system measurement.