Just a random question
I'm not trying to solve a problem, rather I am looking for specific words to expand my C# vocabulary. What did I do from line 11 through 15? Is that what you call an instance of an object? Normally, I instantiate objects by doing this:
Type name = new Type();
but I'm not entirely sure what you call what I did from line 11 through 15.6 Replies
You declared fields
Private fields, to be more precise
Each and every one of them being, most probably,
null
Or default
Ahh
But they are first initialised in the Start method right?
Yes, that's where you initialize them
Sweet, thanks
Declaration Without Initialization
Initialization Order
The complete order list (when you class inherits from another class, has static field, etc):
1. Static fields
2. Static constructor
3. Instance fields
4. Base static fields
5. Base static constructor
6. Base instance fields
7. Base constructor
8. Constructor
9. Object initializer.
Thanks!