If you define integer variable and a object variable and a structure then how those will be plotted in memory ?
Answer Posted / 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 |
Post New Answer View All Answers
What is the use of oops in c#?
What do you mean by shared assembly?
How do you escape c#?
Can you pass parameters to destructors?
What is the task perform by clr?
Define interface class in c#?
What is an array of arrays called?
What does do in c#?
Can hashset contain duplicates c#?
Who introduced c#?
What is asynchronous one-way calls?
What is ac callback?
Does hashset allow duplicates c#?
What happens if you add duplicate elements to a set?
Is c# a keyword?