Quantcast
Channel: coder i|o: #strings
Viewing all articles
Browse latest Browse all 138

C#: More On Array Variance

$
0
0

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 all articles
Browse latest Browse all 138

Trending Articles