Friday, 27 May 2016

. NET FRAMEWORK

The  .Net framework is the platform which is used to create the environment to run and execute the manged code.
The .Net framework contains CLR (Common language Runtime),CTS and CLS(Common language specification) which help to create the Suitable environment for managed code execution.The managed code like C# goes through many phase before it convert to the  machine language. When we compile the C# code, then Compiler convert this code to MSIL (Machine Intermediate language) not to the machine language, this MSIL is  OS and Hardware independent. After creation of MSIL, the CLR comes in picture CLR call the JIT (Just in time compiler) to convert the MSIL to the Machine code. It convert the MSIL to the machine code as required demand basis,  means, when that particular code required, then  only that code converted to the Machine code not the complete code.

Ther are two different type of Language in .net framework Managed code and Unmanaged code.
The code which obey all the rule of CTS and CLS then it is called managed code 
.Net framework :=> A programing infrastructure created by microsoft for building deploying and running application and services that use .net technology.

The .net technology contain three main parts
1)CLR
2)CTS
3)CLS

This is the architecture of the .Net framework, where as CLR also has some internal architecure


There is the Architecture of CLR: The CLR contain  GC and code manager, The Garbage collector play important role in allocating and deallocating of memory
Here I am going to show how the  code execution can take place and what  are all the phase of execution.

Wednesday, 25 May 2016

C# language basics

The language is generally used to communicate with one another, or it used to express their feelings. If we people want to express their feeling then we need some language , So that communication should be fluent and easy.
Same thing happen with Computer also it required one language to communicate like C and C#.
So we can say that C# is computer language, which is used to communicate with computer.
I want to tell you a story about a man who went to USA, He know some what english but not too good in english. So he always tarvel with dictionary , and use this dictionary when  he encounter with complex and complicated words.

Same thing happen with  compiler, Compiler use dictionary to resolve his complex and complicated words.
In C# language compiler use the dictionary  by refering USING Syntax.

I am starting with simple C# program (to print hello Tutorial)

First Demo Class program

 As we go through this code we observe lot of thing like System Console and Writeline and Readkey etc.

Here System is the namespace where as Console is the Static class,which  is present in the System namespace. So by the help of USING I am going to import this on our program.

NameSpace is the container which contain the class ,It used to avoid name conflict with another same name  class which is  present in the assembly.

C# is the pure object oriented programing language, so every thing present inside the Class.

Main is the entry point of the  program execution, So operating system start the execution of program from Main.

We are making Main as static so that it is the property of class  not object hence we donot require any object to call the Main method,operating System use the  Program class to call the Static Main method.

Console is the Static class, hence all the member of this class is by default static.WriteLine and Readkey are the static method, so we call this method by the help of Console class , we donot required any  object to call this method.

The Argument present in the Main are optional if you want you can remove this.
The Console.WriteLine are used to print the content on to the console.Where as Console.ReadKey are used to get data from the console.

The console is anything through which you are going to communicate with  your computer.Like Keybord and Monitor(VDU) etc.

This is the first tutorial through which you learn  to write the Hello world on console Application