A data type is a set of values.
In C# two main data types are value and reference types.
Value types are created on the stack
Structs
We were given an example piece of piece of code for a star fighter the first task was to use // to add comments to tell what parts of the code did what and how they all interact with each other.
Next we were tasked with modifying the code for a different context, I went with a Lord of the rings fight between Gandalf and the Balrog so i replace their stats to better represent a fight between these characters. For example strengths has been changed to magic as both of these are magic based characters.
Enums
For the Enums i used it to rank the three main and most powerful metals in the Marvel universe Uru, Adamantium and Vibranium. I declared all of these in the Enum part of the code and then in the void start section i put all my metals in there and put my rankings in brackets and quotation marks.
コメント