An Array is a Ref Type? what about the array elements which
are value type(int,Float...etc)?
Answer Posted / 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 |
Post New Answer View All Answers
What is the c# equivalent of c++ catch (…), which was a catch-all statement for any possible exception? Does c# support try-catch-finally blocks?
Where are value types stored in c#?
What is native image generator (ngen.exe)?
What Is The Smallest Unit Of Execution In .net?
What is the difference between IEnumerator and IEnumerable?
How many types of constructors are there?
If I have more than one version of one assemblies, then how'll I use old version (how/where to specify version number?)in my application?
Is as operator in c#?
What is a service layer c#?
What is this keyword in C#?
How big is an int in c#?
How do I simulate optional parameters to com calls?
What is func delegate in c#?
What is the difference between returning iqueryable vs ienumerable?
What is callback function in c#?