Posts

Showing posts with the label .Net Framework

Different Types of JIT Complier

Image
JIT stands for just-in-time compiler. It converts the MSIL code to CPU native code as it is needed during code execution. It is called just-in-time since it converts the MSIL code to CPU native code; when it is required within code execution otherwise it will not do nothing with that MSIL code. Different Types of JIT Normal JIT This complies only those methods that are called at runtime. These methods are compiled only first time when they are called, and then they are stored in memory cache. This memory cache is commonly called as JITTED. When the same methods are called again, the complied code from cache is used for execution. Econo JIT This complies only those methods that are called at runtime and removes them from memory after execution. Pre JIT This complies entire MSIL code into native code in a single compilation cycle. This is done at the time of deployment of the application.

Understanding Relationship Between CTS and CLS

Image
CTS and CLS are parts of .NET CLR and are responsible for type safety with in the code. Both allow cross language communication and type safety. In this article I would like to expose the relationship between these two. CTS CTS stands for Common Type System. It defines the rules which Common Language Runtime follows when declaring, using, and managing types. The common type system performs the following functions: It enables cross-language integration, type safety, and high-performance code execution. It provides an object-oriented model for implementation of many programming languages. It defines rules that every language must follow which runs under .NET framework. It ensures that objects written in different .NET Languages like C#, VB.NET, F# etc. can interact with each other. CLS CLS stands for Common Language Specification and it is a subset of CTS. It defines a set of rules and restrictions that every language must follow which runs under .NET framework. Th...

A brief version history of .NET Framework

 .Net is a software development platform developed by Microsoft. It runs on Microsoft Windows OS. .NET provides tools and libraries that allow developers to develop applications and services much easily, faster and secure by using a convenient way. .NET Framework Version History .NET Version Introduced with IDE Features Detail 4.5.1 Visual Studio 2013 Includes performance and debugging improvements Support for automatic binding redirection Expanded support for Windows Store apps 4.5 Visual Studio 2012 Features Enhancements to CLR 4.0 Async Support Support for building Windows Store apps Features Enhancement to WPF, WCF, WF, and ASP.NET 4.0 Visual Studio 2010 Introduced CLR 4.0 Managed Extensibility Framework (MEF) Dynamic Language Runtime (DLR) Task Parallel Library 3.5 Visual Studio 2008 Built-In AJAX Support LINQ Dynamic Data Multi-targeting Framework Support 3.0 Visual Studio 2...

Difference between Finalize() and Dispose() methods in .NET

Finalize: 1. Finalize() belongs to the Object class. 2. It is automatically called by the Garbage Collection mechanism when the object goes out of the scope(usually at the end of the program 3. It is slower method and not suitable for instant disposing of the objects. 4. It is non-deterministic function i.e., it is uncertain when Garbage Collector will call Finalize() method to reclaim memory. Example: class employee { //This is the destructor of emp class ~employee() { } //This destructor is implicitly compiled to the Finalize method. } Dispose: 1. Dispose() belongs to the IDisposable interface 2. We have to manually write the code to implement it(User Code) ex: if we have emp class we have to inherit it from the IDisposable interface and write code. We may have to suppress the Finalize method using GC.SuppressFinalize() method. 3. Faster method for instant disposal of the objects. 4. It is deterministic function as Dispose() method is explicitly called by the User Code.  Exam...

Difference between CTS and CLS

CTS: 1. Abbreviation: CTS stands for Common Type System 2. Meaning: It describes how types are declared, used and managed in the runtime and facilitates cross-language integration, type safety, and high performance code execution. The types defined by the CTS are broadly classified into value types and reference types. Value types are those which themselves contain data/methods/resources represented by the type - like an integer variable is a value type. Reference types are those which refer to value types and a pointer or a reference is an example of such a type. All types derive from 'System.Object' base type.  3. Power of CTS: CTS is a superset of the CLS,i.e.,all .NET languages will not support all the types in the CTS.  4. Example:  “Integer” datatype in VB and “int” datatype in C++ are not compatible, so the interfacing between them is very complicated. In order that two different languages can communicate, “Integer” in VB6 and “int” in C++ will convert to System.i...