If you define integer variable and a object variable and a structure then how those will be plotted in memory ?
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 |
How to rotate an Image in C#?
0 Answers Petranics Solutions,
What is Dispose method in .NET?
What does the dispose method do with the connection object?
What is difference between out and ref in c#?
What is array and types of array in c#?
Can a class inherit structure.
What are the advantages of using delegates in c#?
How to add controls dynamically to the form using c#.net.
What is singleordefault c#?
What are destructors in C#?
1 Answers TryTechnicals Pvt Ltd,
If a.equals(b) is true then a.gethashcode & b.gethashcode must always return same hash code.
What do you mean by thread safe in c#?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)