Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are static and dynamic variables?

1098


Write a short note on interface?

947


Why do we override in c#?

837


What is the .net datatype that allows the retrieval of data by a unique key?

864


Which sorting algorithm is best?

946


What is difference between overloading and short circuiting?

941


how can one use hcl and c sharp together?

2023


What is a protected class in c#?

905


What do you mean by string objects are immutable?

956


What are bitwise logical operators?

860


Are c# strings null terminated?

983


Explain the process of inheriting a class into another class?

955


What are the types in c#?

866


Is string passed by reference in c#?

875


What is the difference between ienumerable and icollection?

882