Use this space to put some text. Update this text in HTML

468x60 banner ad

Advertise with Us

Powered by Blogger.

Saturday 30 January 2016

What is Value Type and Reference Type?



 Value Type

Value types are fixed in size. It maintains into system stack, Actual value of value type is stored in stack. All primitive type except string and object and user defined type like struct and enum are example of value type.

Reference Type

Reference types are not fixed in size. It maintains into managed Heap, but it also use stack to store reference of heap. Two primitive type like string and object and user defined type like class, interface and delegate are example of reference of heap.


What is Weakly Type and Strongly Type Language?


On the basis of data type all programming language are categories into two parts

Weakly Type

If language contain same data type to represent different type of data known as weakly type language.

Example -> Markup language, script, java script.

Strongly Type

If language contain different data type to represent different type of data known as Strongly type language.

Example-> C, C++, .Net, Java.

11) Any language data type is categories

Primitive (Pre-Defined)

Int, unit, byte, sbyte, object, bool

Non-Primitive

Class, Struct, enum, interface, delegate.


Friday 29 January 2016

what is difference between Managed Code and Unmanaged code?


Managed Code Unmanaged Code
Managed code is execute by CLR Unmanaged code is directly executed by the Operating System.
In Managed code, the memory allocation, type Safety , Security taken care by CLR.  In UnManaged code, the memory allocation, type Safety , Security taken care by Developer. 
Managed code is written in language like C#, VB.Net, Java. Un managed code are written in language like C, C++.




what is Unmanaged Code?



The code which is developed outside the dot net framework application domain but can be executed in .Net domain is known as managed code.this code execute in unmanaged code execution process.
It uses wrapper classes.

There are two types of Wrappers

1.      CCW(Compile Time Callable Wrapper)

Unmanaged source code executes.

Source code -> IL Code -> Executable Code ->Native Compiler -> CPU -> Output 

2.      RCW(Run Time Callable Wrapper)

Unmanaged compiled code executes.

Source code -> Executable Code -> CPU -> Output  


What is Managed Code?



The code which is developed inside dot net framework domain is known as managed code. And executes it managed code execution process.

Example- C#, vb.net etc.

Source Code -> IL Code -> JIT Compiler-> Native Compiler -> Executable Code-> CPU -> Output 

Thursday 28 January 2016

What is Common language Specification(CLS)?


1. CLS stands for Common Language Specification and it is a subset of CTS.

2. It defines a set of rules and restrictions that every language must follow which runs under .NET framework.

3. CLS enables cross-language integration.

For example:

 One rule is that you cannot use multiple inheritance within .NET Framework. As you know C++ supports multiple inheritance but; when you will try to use that C++ code within C#, it is not possible because C# doesn’t support multiple inheritance.

One another rule is that you cannot have members with same name with case difference only i.e. you cannot have add() and Add() methods. This easily works in C# because it is case-sensitive but when you will try to use that C# code in VB.NET, it is not possible because VB.NET is not case-sensitive.