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 desktop GUI application?
Write a program to create a user control with name and surname as data members and login as method and also the code to call it. (Hint use event delegates) Practical Example of Passing an Events to delegates
Can hashtable have duplicate keys?
Do vs while c#?
What is boxing in c#?
Why are strings in c# immutable?
Which debugging tools you can use in the .NET ssSDK?
What is icollection in c#?
What is property c#?
What standard types does c# use?
Enlist some of the properties of a thread class?
What does type safe mean in c#?
Is stringbuilder thread safe c#?
What is the use of console readkey ()?
Explain the difference between a namespace and assembly name in .net?