Structures, Objects, Classes and Components

Hi,

Can someone please explain to me the difference between these 4 terms?

Cheers

Well for the first and third, these are two different ways to handle data in memory and they can have big implications in your code. This is more of an abstract language concept that’s part of the .NET framework, but not limited to the .NET framework. Lots of languages use these differences. Here is a tutorial explaining the differences.

A class is the blueprint for an object. It holds data and code that operates on that data at runtime after one of them is created. For instance:

public class Person{

   String Name {get; set)
   int      Age {get; set;}
   public void SayHello(){...}
} 

… is a class that naively describes a person. I can create a Person Object by saying " Person personInstance = new Person()"

then I can do something like this if I have a HashSet called people

foreach (Person person in people){
   person.SayHello();
}

A component is a class that’s specific to Unity documented here. It is a base class that allows you to interact with the engine and the Unity environment in certain ways.

There are tons of really good C# books out there, that might be a good place to start for you.