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

Which are the access modifiers available in c#?

948


How does split work in c#?

887


What is the difference between inheritance and abstract class?

880


What is an actual parameter?

947


What do you mean by a windows process in regards to memory allocation?

952


Howmany five tracing levels in System.Diagnostics.TraceSwitcher? Why they are using?

1033


Can main method be final?

895


What is sorted list in c#?

884


What are circular references? How garbage collection deals with circular references.

914


What do you understand by an Implicit Variable?

1000


What is Implementation inheritance and interface inheritance?

987


What is assembly manifest?

1023


What is yield break in c#?

903


Can constructor be protected in c#?

929


Explain the difference between and xml documentation tag?

903