TOP CENTER
     

11

What are Keywords?   New Page 1
What is Object-Oriented Programming?
What is Microsoft .NET?
What is C#?
What is Common Language Runtime (CLR)?
What do you mean by .NET Framework Class Libraries?
What are Namespaces?
What are the requirements for developing a C# application?
What are the steps involved in developing a C# application?
What will happen after the compilation of a C# program?
What are Identifiers?
What are Keywords?
How do I begin programming with C#?
What are the different editors that are available for C# programming?
How do I build a C# application using Command Line Compiler?
How do I build a C# application using Visual Studio .NET 2003?
How do I build a C# application using Visual Studio .NET "Whidbey"?
 

Anand Narayanaswamy

Posted - February 05, 2005
 
Keywords are special words built into the C# language and are reserved for specific use. This means you cannot use them for naming your classes, methods and variables. For instance, if you attempt to use a C# keyword (if) as your class name, the C# compiler will emit runtime error as shown in Figure 11.1.

Figure 11.1 {View enlarged Picture}

In order to resolve the problem, you may have to change the class name to some other meaningful name. There are around 80 keywords in C#.