If you define integer variable and a object variable and a structure then how those will be plotted in memory ?



If you define integer variable and a object variable and a structure then how those will be plotted ..

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

Post New Answer

More C Sharp Interview Questions

What is the signature of a method?

0 Answers  


i want the csharp questions&answeres

0 Answers   IBM, Siemens,


What are the generation of Garbage Collection in C# .NET ?

0 Answers   MCN Solutions,


What is use of FormBoarderStyle Propertie

0 Answers   MCN Solutions,


what is the purpose of Interfaces?

7 Answers   HCL,


i have a string aabccefsdss.how can i get the string abcefsd. or write the fallowing string with only character occurrence of once .

1 Answers  


Are arrays immutable c#?

0 Answers  


What is a method signature in c#?

0 Answers  


What are the variables in c#?

0 Answers  


What's the difference between an integer and int?

0 Answers  


What is a property in c#?

0 Answers  


Does google use c#?

0 Answers  


Categories