Let us first understand how VB6 or C++ programs (Non Dotnet applications) used to execute.
We know that computers only understand machine level code. Machine level code is also called as native or binary code. So, when we execute a VB6 or C++ program, the respective language compiler, compiles the respective language source code into native code, which can then be understood by the underlying operating system and hardware. This process is depicted in the image below.
Native code is specific (native) to the operating system on which it is generated. If you take this compiled native code and try to run on another operating system it will fail. So the problem with this style of program execution is that, it is not portable from one platform to another platform.
Let us now understand, how a .Net program executes. Using dotnet we can create different types of applications. A few of the common types of .NET applications include Web, Windows, Console and Mobile Applications. Irrespective of the type of the application, when you execute any .NET application the following happens
1. The .NET application gets compiled into Intermediate language (IL). IL is also referred as Common Intermediate language (CIL) and Microsoft Intermediate language (MSIL). Both .NET and non .NET applications generate an assembly. Assemblies have an extension of .DLL or .EXE. For example if you compile a windows or Console application, you get a .EXE, where as when we compile a web or Class library project we get a .DLL. The difference between a .NET and NON .NET assembly is that, DOTNET Assembly is in intermediate language format where as NON DOTNET assembly is in native code format.
2. NON DOTNET applications can run directly on top of the operating system, where as DOTNET applications run on top of a virtual environment called as Common Language Runtime (CLR). CLR contains a component called Just In-Time Compiler (JIT), which will convert the Intermediate language into native code which the underlying operating system can understand.
So, in .NET the application execution consists of 2 steps
1. Language compiler, compiles the Source Code into Intermediate Language (IL)
2. JIT compiler in CLR converts, the IL into native code which can then be run on the underlying operating system.
This process is shown in the image below.
Since, a .NET assembly is in Intermedaite Language format and not native code, .NET assemblies are portable to any platform, as long as the target platform has the Common Language Runtime (CLR). The target platform's CLR converts the Intermedaite Language into native code that the underlying operating system can understand. Intermediate Languge is also called as managed code. This is because CLR manages the code that runs inside it. For example, in a VB6 program, the developer is responsible for de-allocating the memory consumed by an object. If a programmer forgets to de-allocate memory, we may run into hard to detecct out of memory exceptions. On the other hand a .NET programmer need not worry about de-allocating the memory consumed by an object. Automatic memory management, also known as grabage collection is provided by CLR. Apart, from garbage collection, there are several other benefits provided by the CLR, which we will discuss in a later session. Since, CLR is managing and executing the Intermediate Language, it (IL) is also called as managed code.
.NET supports different programming languages like C#, VB, J#, and C++. C#, VB, and J# can only generate managed code (IL), where as C++ can generate both managed code (IL) and un-managed code (Native code).
The native code is not stored permanently anywhere, after we close the program the native code is thrown awaya. When we execute the program again, the native code gets generated again.
.NET program is similar to java program execution. In java we have byte codes and JVM (Java Virtual Machine), where as in .NET we Intermediate Language and CLR (Common Language Runtime)
We know that computers only understand machine level code. Machine level code is also called as native or binary code. So, when we execute a VB6 or C++ program, the respective language compiler, compiles the respective language source code into native code, which can then be understood by the underlying operating system and hardware. This process is depicted in the image below.
Native code is specific (native) to the operating system on which it is generated. If you take this compiled native code and try to run on another operating system it will fail. So the problem with this style of program execution is that, it is not portable from one platform to another platform.
Let us now understand, how a .Net program executes. Using dotnet we can create different types of applications. A few of the common types of .NET applications include Web, Windows, Console and Mobile Applications. Irrespective of the type of the application, when you execute any .NET application the following happens
1. The .NET application gets compiled into Intermediate language (IL). IL is also referred as Common Intermediate language (CIL) and Microsoft Intermediate language (MSIL). Both .NET and non .NET applications generate an assembly. Assemblies have an extension of .DLL or .EXE. For example if you compile a windows or Console application, you get a .EXE, where as when we compile a web or Class library project we get a .DLL. The difference between a .NET and NON .NET assembly is that, DOTNET Assembly is in intermediate language format where as NON DOTNET assembly is in native code format.
2. NON DOTNET applications can run directly on top of the operating system, where as DOTNET applications run on top of a virtual environment called as Common Language Runtime (CLR). CLR contains a component called Just In-Time Compiler (JIT), which will convert the Intermediate language into native code which the underlying operating system can understand.
So, in .NET the application execution consists of 2 steps
1. Language compiler, compiles the Source Code into Intermediate Language (IL)
2. JIT compiler in CLR converts, the IL into native code which can then be run on the underlying operating system.
This process is shown in the image below.
Since, a .NET assembly is in Intermedaite Language format and not native code, .NET assemblies are portable to any platform, as long as the target platform has the Common Language Runtime (CLR). The target platform's CLR converts the Intermedaite Language into native code that the underlying operating system can understand. Intermediate Languge is also called as managed code. This is because CLR manages the code that runs inside it. For example, in a VB6 program, the developer is responsible for de-allocating the memory consumed by an object. If a programmer forgets to de-allocate memory, we may run into hard to detecct out of memory exceptions. On the other hand a .NET programmer need not worry about de-allocating the memory consumed by an object. Automatic memory management, also known as grabage collection is provided by CLR. Apart, from garbage collection, there are several other benefits provided by the CLR, which we will discuss in a later session. Since, CLR is managing and executing the Intermediate Language, it (IL) is also called as managed code.
.NET supports different programming languages like C#, VB, J#, and C++. C#, VB, and J# can only generate managed code (IL), where as C++ can generate both managed code (IL) and un-managed code (Native code).
The native code is not stored permanently anywhere, after we close the program the native code is thrown awaya. When we execute the program again, the native code gets generated again.
.NET program is similar to java program execution. In java we have byte codes and JVM (Java Virtual Machine), where as in .NET we Intermediate Language and CLR (Common Language Runtime)
Venkat I really appreciate for you efforts to make things easy to understand. I was really struggling to understand certain concepts but you made it clear and help me bring back my confidence.
ReplyDeletehi, venkat i really happy with ur videos i learnt a lot with those
ReplyDeletethanks
janardhana
OK Thank u Janardhan u learn more after listning video iam right or wrong
DeleteVenkat...Thank you very much for these videos. They are very easy to understand and time saving. Can you please upload videos for WPF training as well? I have searched a lot for WPF beginner tutorial but no video matches the simplicity and clarity provided by your C# videos!
ReplyDeleteThank you Venkat for the nice tutorial. It helped me to understand the CLR concept and its use in .Net application.
ReplyDeleteThanks, It is very informative and simple to understand. This was my first attempt to learn c#, I got everything clear by one shot.
ReplyDeleteThank you very much
thank for giving this class to me
ReplyDeleteawesome sir its very great tanku for posting
ReplyDeleteHello Venkat,
ReplyDeleteYou are amazing Sir.
So much clarity you bring in to the subject.
Lucky to find this site and many many thanks to you for putting this up. Keep up the good work and God bless you.
Venkat Rao
Hi venkat....You are amazing,i love ur explanantions,ur way of training is superb,with love from Pakistan
ReplyDeleteHi venkat, I have been a programmer for over 7 years and never pay much attention of how my codes run. After seeing this tutorial I got another perception. More grease to your elbow!
ReplyDeleteHi,
ReplyDeleteWhat should I say about your tutorial, only "These are the best"
Thanks for giving all these to us in easy way.
Ritu
YAhye I really appreciate for you efforts to make things easy to understand. I was really struggling to understand certain concepts but you made it clear and help me bring back my confidence.
ReplyDeletehi venkat,ur videos has cleared many doubts,and have leanred a lot from ur videos,hats off to u venkat,alot thanks to u for taking out the time to makeout this things of teaching.
ReplyDeleteExcellent work.
ReplyDeleteI would like to cite the reference of your video-tutorials in a scientific paper. I will cite the part ".NET Program Execution". I need the following information:
Your full name. Otherwise I will write just Venkat.
Year of publication. Otherwise I will cite as 2013.
Thank for your help to community. Great job, keep it up.
Hi Venkat,
ReplyDeleteYour videos and blogs are really great. I have utilized them verymuch to improve my programming skills.
Sasi Kumar
Hi Venkat,
ReplyDeleteThank you, wonderful clarity and simple to follow. Great flow in the lectures. I ve been into procedural language programming fr long, I thought I can never learn ,net and sql so quickly, thank you once again, Keep up the great work, God bless you.
Abi
Abi
Hi Venkat,
ReplyDeleteI really appreciate your wonderful explaination.I watch and read all c# and asp.net videos and material regurally. Your blogs are very useful for everybody not only learners but a well exeperienced people as well.
Regards
Malla reddy.
Hi Venkat,
ReplyDeleteI am loving the way you explain the things. You have really made it look very easy..just awesome work.
I highly appreciate that...
Regards,
Zeeshan
Dear friend,Thanks a lot. I dont have words to thank you. You are doing bravo job.
ReplyDeleteHi Venkat,
ReplyDeleteWe Really appreciate the way you made things easy to understand.
And are thank full.
Is it necessary to install VS on machine to run .Net applications ( Desktop or Web).
Hello Sir,
ReplyDeleteDoing a great job!!.. The concepts are explained in such 'easy to understand' way.. I do have a suggestion though.. I think you could probably add "Test" to know how much we have understood... Keep up the good work Sir..
I love all of your tutorials. They are always the most thorough and clear tutorials I can find.
ReplyDeleteHi Venkat
ReplyDeleteI just want to say thanks for Venkat series. It's all useful. One of my fried told me about Venkat Series. Currently I am also watching your C# and MVC Videos on YouTube. Daily, I give you lots of good wishes. Really, Thanks a lot.
Hi Venkat,
ReplyDeleteVery good explanations..but if you explain type of JIT compiler..It would be useful for us.
Thanks,
Karthik
Dear Venkat Sir!
ReplyDeleteAccording to this vedio of you, i understood that if CLR can be installed on Linux than a .NET application is supposed to run on Linux. My query is- is it possible to install .NET CLR on linux platform? If not is there any other effective way to run .NET application on Linux platform?
Hi Venkat,
ReplyDeleteThanks for making the things very easy , by reading the topics we are getting very interesting and getting confidance.
We Really appreciate U the way you made things easy to understand.
Tnks,
Ravinder
Dear sir,
ReplyDeleteNice Explanation..I have one Question?
Language compiler will convert the .Net code into MSIL or IL Code ..But here The L.C will covert directly to the MSIL or IL Code or IS there any Format(code)
hi venkat ,
ReplyDeleteyou are awesome in explaining and love the way of it
madhuri
Venkat Rocks! Amazing tutorials..
ReplyDeleteDear Venkat,
ReplyDeleteWhen ever I need any topic to understand I watch your videos for C# and .NET.
Your tutorials are excellent and very well explained. You have superb expertise skills on these technologies I really appreciate your efforts!!
Wanted to meet you at your office @ PRAGIM Technologies.
Regards,
Ashish.
Never been better. Your the Best Teacher!!
ReplyDeleteExplained very well thanks a lot Venkat
ReplyDeleteThanks
Ashish
Hello Venkat,
ReplyDeleteI want to learn DOTNET and I know Foxpro/clipper etc. Can u guide me in this line to develop applcations for commercial purpose. If you conduct classes, pl let me know the same - also how to get a copy of DOT NET for installing in PC. How much it costs. I want to learn database handling also reporting and develop multi user applications as field of interest. I appreciate your first video that I saw today. very narrative and easy to understand. Thanks for that.
Thanks
M J Kini, Mangaluru
Thanks You Venkat Sir.I have learn .net very quickly by studying your tutorials.you are doing so good work.thanks a lot for such nice tutorials.
ReplyDeletebro how i can understand the basic .......and also thanks for this tip please
ReplyDeleteThanks , it's really helpful to understand
ReplyDeleteHi sir,
ReplyDeleteI am a beginner. I wish to know that how can i use stored procedure in 3tier architecture . Please add the videos related to 3tier and stored procedure.
Hi sir,
ReplyDeleteI am a beginner. I wish to know that how can i use stored procedure in 3tier architecture . Please add the videos related to 3tier and stored procedure.
Hello venkat i am nitesh, i really thankful to u,bcoz i learned too much about c# & sql server from ur brief discussion in videos.
ReplyDeleteHello Venkat, your training tutorials are well worth a read to understand the background concepts. With this knowledge on the back of mind, it is much easier to understand various error codes and program with clear understanding. Thank you Sir for all your time and effort.
ReplyDeleteVenkat,
ReplyDeleteThank you so much for explaining all the concepts in a very simple and easy way.
Glad I found the right and best videos to enhance my knowledge ...grateful for you! Thanks. Stay Blessed!
Venkat
ReplyDeleteSimple you are the Best may Allah grant you Heaven, and Bless your mum where ever she is...