If you define integer variable and a object variable and a structure then how those will be plotted in memory ?
Answer / mr vinod kumar
Integer , structure – System.ValueType -- Allocated memory on stack , infact integer is primitive type recognized and allocated memory by compiler itself .
Infact , System.Int32 definition is as follows :
[C#]
[Serializable]
public struct Int32 : IComparable, IFormattable, IConvertible
So , it’s a struct by definition , which is the same case with various other value types .
Object – Base class , that is by default reference type , so at runtime JIT compiler allocates memory on the “Heap” Data structure .
Reference types are defined as class , derived directly or indirectly by System.ReferenceType
Is This Answer Correct ? | 0 Yes | 0 No |
What is the components of window?
Which are the loop types available in c#?
What is difference between the "throw" and "throw ex" in .net?
Can you override private virtual methods?
What is foreach loop in c#?
What is command object in c#?
Is stringbuilder thread safe c#?
What are the differences between events and delegates in c#?
What is covariance and contravariance? Did Delegate and method overriding support these?
How to Show Message box in Metro Style App?
Which is faster dictionary or list?
What is dataadapter c#?