Tuesday, July 28, 2009

C# help. What does it mean to "initialize the value" for these variables?

for my c# class i need help with the second half of my worksheet.


it has a list like this of variables :


int count =


double total =


string name =


etc





what would it look like if i "initialized the value"

C# help. What does it mean to "initialize the value" for these variables?
It would look like this:





int count = 0;


double total = 0;


string name = "My name";
Reply:Wow you're a real beginner.





Set the numbers to 0 and the strings to ""
Reply:Give them initial or starting values. Like this:





int count = 0;


double total = 0.0;


string name = "";


No comments:

Post a Comment