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 serialization in dot net?
Write a program in c# to find the angle between the hours and minutes in a clock?
What is interpolation in programming?
what is the scope of anonymous type ?
What is an assembly qualified name
Explain the types of comments in c#?
What is Global Assembly Cache (GAC) and what is the purpose of it? (How to make an assembly to public? Steps) How more than one version of an assembly can keep in same place?
What do you mean by parsing and how to parse a date time string in c#?
How do you declare a variable in c#?
Is Facebook a desktop application?
In howmany ways can you deploy an assembly?
What are data types in C#?
What does args mean in c#?
What is the difference between constants and read-only?
Differentiate between method overriding from method overloading with its functionality?