Home arrow C# arrow Page 4 - 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 - C# Statements
(Page 4 of 9 )

A C# statement is the same as a complete sentence in the English language. This is the best and simplest analogy that illustrates what a statement is. Look at the following example:

I like Microsoft products.

Anyone reading this sentence will understand that I like Microsoft products.  However, if I write it like this:

I like.

What do you like? This is what you may ask because its not a complete sentence.  The same thing goes with a C# statement.   It forms a complete instruction that the C# compiler can understand.  So the next statement adds two numbers and stores the value into memory.

memory = 2 + 5;

Note that C# statements end with the semicolon ;, whereas English sentences end with a full stop .  In this last C# statement we told the compiler to put the result of adding these two numbers into memory.  Dont worry about understanding the code right now; that will be covered later on.

You must know that C# programs consist of sequences of C# statements that execute in ascending order like the following example:

statement 1
statement 2
statement 3

The first statement (statement 1) will execute first, then statement2 and end up with the last one (statement 3) being executed.

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