المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Problem with brackets on the 'Console.WriteLine' & the 'Console.ReadLine' commands



C# Programming
08-05-2009, 05:22 PM
Hello everybody,

I am new to c# and im currently just playing around. I am writing a simple program that uses the command Console.WriteLine. I dont have too much experience with programming and i am only 12. Therefore please do not send me a awnser that is complicated. I do have a Dummies book for c#2008 however that does not seem to help. Someone sent me a basic guide and that did not seem to help eather. (If you are that person that you for trying to help). Here is my code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Variables_with_input_from_the_user
{
class Program
{
static void Main(string[] args);
//The computer is now asking the user to enter his name.
Console.WriteLine("Enter your name:");
//The line below is telling the computer that this type of variable is a variable that can hold letters instead of numbers. It is then saying that the name the person entered is the variable n.
string name = Console.ReadLine();
SByte n;
Console.WritelLine("Enter your age");
n; = Console.WriteLine
Console.ReadLine("Your name is " + String namehttp://www.barakasoft.com/script/Forums/Images/smiley_wink.gif;
System.Console.WriteLine(" and your age is " + nhttp://www.barakasoft.com/script/Forums/Images/smiley_wink.gif;
}
}

It is giving me a error that says: Invlaid toke ( in class ,in struct or in member decleration.

It is giving me thease errors for all my brackets

Thank You,
Aman

PS:Sorry that this Question was so long.