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...


An Array is a Ref Type? what about the array elements which
are value type(int,Float...etc)?

Answers were Sorted based on User's Feedback



An Array is a Ref Type? what about the array elements which are value type(int,Float...etc)?..

Answer / vibz

the array elements are boxed to Object type internally.

Is This Answer Correct ?    22 Yes 4 No

An Array is a Ref Type? what about the array elements which are value type(int,Float...etc)?..

Answer / anand

address of value type elements (variables) were stored in
the array name, eg: For int value type you wil declare as:-
int[] arrayname=new int[];
here arrayname contains the address of the elements stored
in it.
int[] arrayname=new int[] {5,4,3,2,1};
arrayname denotes to the address of 5.

Is This Answer Correct ?    4 Yes 0 No

An Array is a Ref Type? what about the array elements which are value type(int,Float...etc)?..

Answer / gyana

Float

Is This Answer Correct ?    4 Yes 3 No

An Array is a Ref Type? what about the array elements which are value type(int,Float...etc)?..

Answer / nishesh

Array is ref type bcoz it holds the address or refrence to the elements and whnever array is used it refers to that address

whereas int, float, double are value types bcoz they directly stores value.

another difference
whn we make changes in array it does not allocate any new memory to the array elements
but whn we make changes with value types they allocate new memory to the new result obtained

Is This Answer Correct ?    1 Yes 0 No

An Array is a Ref Type? what about the array elements which are value type(int,Float...etc)?..

Answer / vikas toshaniwal

The refrence type always refer the value from other variable

but value type we pass the value to the variable


if the ref variable value is changed than it reflect ot
refrence type but value type don't have any refrence

Is This Answer Correct ?    0 Yes 0 No

An Array is a Ref Type? what about the array elements which are value type(int,Float...etc)?..

Answer / gyana

Float

Is This Answer Correct ?    2 Yes 6 No

Post New Answer

More C Sharp Interview Questions

Can you inherit from a static class in c#?

0 Answers  


What is the difference between a variable and a literal?

0 Answers  


What is connection pooling in ado.net?

0 Answers  


What is Interface and Abstraction (in real time scenario)

4 Answers   HCL,


What does public mean in c#?

0 Answers  


What is a partial class in c#?

0 Answers  


How do you mark a method obsolete?

0 Answers  


Do loops c#?

0 Answers  


Differentiate between sqlclient oledb and providers?

0 Answers  


How many bytes is a long c#?

0 Answers  


What is the difference between list and dictionary in c#?

0 Answers  


Can you override private virtual methods?

5 Answers  


Categories