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 are the generation of Garbage Collection in C# .NET ?
What is difference between method overriding and method overloading?
What is the difference between string keyword and system.string class?
Is c# front end or back end?
What is the difference between readkey and readline in c#?
How do you declare a variable in c#?
How can we set the class to be inherited, but prevent the method from being over-ridden?
Define boxing and unboxing in c#?
What are extensions methods in c#?
Why do we need to override in c#?
Does c# support multilevel inheritance?
3. Use layered architecture for coding. s.no name description 1 abc xxxxxxxxx 2 abc xxxxxxxxx 3 4 5 6 7 8 Select all Clear all Add Delete Name Description Save close
What is string [] args in c#?
How many types of methods are there in c#?
What are the access modifiers in c#?