General C# Flashcards
1
Q
How would you convert the string input to a int.
string score = “32”;
A
int score1 = Convert.ToInt32(score);
2
Q
What does const in the following example mean.
const int max = 4;
A
that the variable can not be modified
3
Q
What would you wrap around the letter A in the example to store a char into a variable?
char firstletter = A;
A
char firstletter = ‘A’;
4
Q
What are the different Jumping statements?
A
break continue goto return throw
5
Q
How would you change this string into a float?
string answer = “23”;
A
float answer2 = float.Parse(answer);