0
How do you tag/name/ID something in C#
I'm working on a minor project for C#, and I'm not sure how one names items. Assistance would be highly appreciated. Also, what does {namespace} do? https://code.sololearn.com/cG8xwIIHqlP4/?ref=app
2 ответов
+ 1
follow the C# course, it explains how variables work.
0
I figured out how to name things... I wasn't paying attention during the variables section.
I originally posted this question to find out how to name a player input as a variable. I just figured out what I needed to do to make player input a variable.
I believe this code* does the job:
do {
Console.Write("x = ");
int x = Convert.ToInt32(Console.ReadLine());
Console.Write("y = ");
int y = Convert.ToInt32(Console.ReadLine());
int sum = x+y;
Console.WriteLine("Result: {0}", sum);
}
while(true);
*Retrieved from the basic calculator section of C# Tutorial.*