We have already seen the use of variables in several places. We define a type, give it a name and assign it to a field to give it a value.
We have also seen instantiating object in several places. We assign a field, which has a type, to an instance of that type.
We can combine these two ideas to assign a variable to a new instance and make it an object.
To do this, we need to define the type we want to instantiate, give it a name and assign it to an instance of the class (custom type) we want it to be.
If we run the application and step over that line, we can see that the food object is now in memory and has all of the fields of the Food class shown in the Autos window.
We can now assign the fields of the food object.
Then we can use that food object as a reference and assign it to fields such as the Employee's Food item.
If we run the application and step over the line of code that assigns the food object to the Employee's Food field we can see that the field is the same as the food object.