
上QQ阅读APP看书,第一时间看更新
Declaration
To create a new variable, we first need to declare it by saying what type of variable it is, and as we explored before, a variable type represents the content. This means that the content for the myNumber variable is a number. The keyword for whole number variables in C# is int and for different types of content, we assign a different keyword. We also have to give our variable a name; myNumber is fine for now. You can use any name you want, as long as it does not contain spaces or special characters.