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
Explain About namespaces
State whether it is true to test a Web service you must create a windows application or Web application to consume this service or not?
What is the difference between ienumerable and iqueryable?
What does dbml mean in texting?
Is c# and .net same?
Define satellite assembly in c#?
How does yield return work c#?
What is the use of static members with example using c#.net.
Give examples for reference types?
Explain the different ways a method can be overloaded?
What are the types of constructors?
What is the syntax for calling an overloaded constructor within a constructor (this() and constructorname() does not compile)?
What is overloading in c#?
What is nameof c#?
What is writeline?