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
How do you specify a custom attribute for the entire assembly (rather than for a class)?
Are enums static c#?
What is main thread in c#?
When was .net linq added?
Explain the difference between const and static read-only?
Why does dllimport not work for me?
Why is static constructor called first?
What is .edmx file?
What is xaml in c#?
What is a linq in c#?
What is multithreading with .net?
What is method overriding in c#
What is short in c#?
What is sqlcommandbuilder c#?
What is difference between ienumerable and ienumerator in c#?