C# Tutorials

C# Tutorials Overview

Welcome to C# Tutorials. The objective of these tutorials is to gain in depth understanding of C# Programming Language.


Introduction to .Net Framework

.NET Framework Supports a collections of languages like VC#.net, VC++.net, VB.net………

.NET Framework is a common architecture for all .net programming languages.

.NET – Network enabled Technology.

Visual C#. net………..visual C# with new features called as net

Main objectives  of  .NET Framework

Plat form independent.

Language independent.

Supports language interoperatibility.

Supports pure OOP’s concepts

Oops –   Object Oriented Programming

Supports for network programming with .net Remoting

Supports to develop back ground process with the help of windows services.

Developing or support to develop RICH GUI applications with WPF programming

LINQ Programming




DLL (Dynamic link library) (Executable) files are  Executable   in any OS with the help of (CLR/Common language run time ) , hence .net is called “plat form   independent”



CLR software is platform dependent.

It  is a separate version of CLR is introduced for every OS.

.net is not purely platform independent.

As of new CLR Software are not yet developed for dos and windows operating systems.


Language Independent









net application logic can be developed in any .net frame work compatible languages, hence .net is called as    “LANGUAGE INDEPENDENT”.

As of now . net framework is supporting 11 languages + 1 specification.

Visual C # . net

Visual basic .net

Visual J #.net

Visual C++ .net

VB Script.net

J Script .net

PHP .net

Phython .net



Small Talk .Net

.net support one specification called as “ASP.net”

Specification provides a set of rules which  needs to be  followed while integrating with a code behind language.

What is a DLL file?

As per VB 6.0 or VC ++6.0

Windows OS



As per VB 6.0 or VC ++6.0 DLL’s are called as COH Components.

COM is used to develop reusable programs.

Every COM Component must be registered for a class ID.

Class ID represents unique identifier , which is a part of Registry.

As Registry is under control of window OS, hence Com is “Plat form independent”.

As per.net

As per .net, DLL’S Contain   Plat form independent  code in the format of byte code.

net DLL is also called as Managed code, Assembly or MSIL (Microsoft intermediate  language )

The code written in .net is called as “managed code”

If COM is used in .net then COM is called as   “un managed code”

.net frame work is introduced as a development plat form

C  language

Main ()


Int I, * p;

P = &I;



As per memory management is under control of CLR  with the help of Garbage collector (GC), hence .net framework is called as “Development platform”.

.net framework is derived in to platform




Frame work class library

A collection of classes is called as “Name space”

A collection of Name space is called as  “Assembly”

A collection of Assembly is  called as “FCL” (Frame work class library)

FCL contains –6000 predefined class

6500 Methods

1,00,000 properties


Assembly Architecture

The internal organization of a DLL file is called as “Assembly Architecture”.

Assembly is derived in to three layers

Main fest Information holds the summary of the project.

Type Info holds the data type information of the languages.

MSIL holds the competed code in the format of BYTE Code.






CLR will be loaded in to the memory.

CLR loads Main fest to understand the summary

CLR loads type Info to understand the behavior of the language.

CLR generates CTS (common type system) of CLS (Common language specifications)



Software Requirements

Windows OS (XP, 2000p, 2005, 2003s, vista)

Visual studio .net 2008 professional Edition

IIS Server

Oracle / SQL Server

MS – office

Visual C # .net 3.5 2008 

A collection  of programs is called as a  “Software”

Software is derived in to two types



11A software  which is developed for a specific purpose is called as  “package”.

Ex :-   MS – office, oracle, SQL server , operating system.


11A software which is developed  for a general purpose is called as a “language”.

Ex:- C, C ++, VC ++, Java, C #. Net etc……… 11       c- family

Languages are derived in to three types

High level language

Assembly language

Machine language

A = 10       more 10 to Ax 11 register 11 flip flop 11 gates

High level language are easier to learn as these are syntactically similar to English

Assembly language are required while developing device driver programming

Which provides communication between hardware and software

Device drivers properties the communication than between the hardware and software

Visual C#.net basics

VC#.net language is architected by ANDREN HEZLSIBERG.

VC#.net belongs to ‘C’ family.

All the rules of ‘C’ language are applicable to VC#.net also.

C#.net is a high level compiler based programming language.

.net is case sensitive.

C#.net is highly type safe language.

In C# , always Execution starts from main ().


Writing First Example in C # .NET

Open.net software

(Start 11programs11micro soft visual studio 2008 11  micro soft visual studio 2008)


(Start 11 run11Devenv)

File menu11new 11project





11For every project a new folder will be created . by default this folder name will be same as project name.

Default folder structure

D:/C194 11FIRST11BIN11DEBUGS11 DLL, EXE files will be sorted here.

11Default folder structure (view11menu11solution explorer)


Open program. CS file and write the following in side of main ()

Namespace FIRST


Class program


Static void Main (Strings [] args)


Console . Write Line (“Welcome”);

Console . Write Line (“Date Time. Now”);

Console . Read line ();


Execute the project  (F5)

11Start Debugging



When above project is executed then first.exe file will be created under D:/c194/first/bin/debug folder.

If you want to compile application, to print a message.

Console. Write Line (“Welcome”);

Syntax is required.


Date Time. Now returns system date and time.

Console .Read line () reads a string from the keyboard.

Review Date
Reviewed Item
Beginners to Advanced C# Tutorial
Author Rating


Please leave a message and we'll get back to you soon.
Three + 6