Quantcast
Viewing latest article 47
Browse Latest Browse All 138

C#: More On Array Variance

From CodeProject:

In a previous post, I went through how arrays have a covariant in relation to the type of its elements, but not safely covariant. In the following example, the second assignment is invalid at run time because, although the type of the objectArray variable is an array of object, the real type of the array is an array of string and an object cannot be assigned to a string.

Click here to read more

Tagged: #c #apis #strings


Viewing latest article 47
Browse Latest Browse All 138

Trending Articles