Home arrow C# arrow Page 3 - C# - An Introduction

C# - An Introduction

Learn the fundamentals of C# as Michael takes us on an introductory tour, including keywords, identifiers, and much more.

Author Info:
By: Michael Youssef
Rating: 4 stars4 stars4 stars4 stars4 stars / 310
November 17, 2003
  1. · C# - An Introduction
  2. · Keywords
  3. · Identifiers
  4. · C# Statements
  5. · C# Building-Blocks
  6. · Commenting Your Code
  7. · Case-Sensitivity and Syntax Errors
  8. · Organizing Code Using White Space
  9. · Conclusion

print this article

C# - An Introduction - Identifiers
(Page 3 of 9 )

Identifiers are simply names for your items.  For example, you are developing a program that contains an item which will add two numbers.  You must give this item a name in your code, so that name is also referred to as an identifier because it will identify your item.

I will give you many examples for identifiers later when appropriate. Now we must differentiate between Keywords and Identifiers. Keywords are special words reserved by the language and Identifiers are names which you can use to call your items (I use the word ‘items’ because I am assuming you don’t know of C#’s building blocks, such as: structs, classes, methods, etc.).
For example I can call my programming item “Michael”, which is an item that can output “Hello I like programming in C#” to the screen.  The item named “Michael” is an Identifier.  I can’t name this item “class”, “int”, or any of the words in Figure 2.1 because they are reserved by C# for special use.

When you name your items you must apply certain rules:

  • The first character in the name must start with a letter (uppercase or lowercase) or an underscore (_).  I.e.: “_myName”
  • The characters after the first can be a digit, an underscore (_), or a letter (uppercase or lowercase)

That’s all what you need to know for now about Keywords and Identifiers.

blog comments powered by Disqus

- Introduction to Objects and Classes in C#, P...
- Visual C#.NET, Part 1: Introduction to Progr...
- C# - An Introduction
- Hotmail Exposed: Access Hotmail using C#
- Razor Sharp C#
- Introduction to Objects and Classes in C#
- Making Your Code CLS Compliant
- Programming with MySQL and .NET Technologies
- Socket Programming in C# - Part II
- Socket Programming in C# - Part I
- Creational Patterns in C#
- Type Conversions
- Creating Custom Delegates and Events in C#
- Inheritance and Polymorphism
- Understanding Properties in C#

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials