什么是开放式泛型类型数组[]的? [英] What is the open generic type of the array []?

查看:163
本文介绍了什么是开放式泛型类型数组[]的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我这样做 INT [] 的String [] T [] - 这是一个通用的阵列。数组是就像一切的对象。

When I do int[], string[], T[] - this is a generic array. An array is just an object like everything else.

那么,什么是真正的开放式泛型类型的[]?我以为这是刚刚超过了一些东西语法糖,如阵列<方式> ,但我一直没能找到任何的排序

So what is the actual open generic type of []? I assume it is just some syntactic sugar over something like Array<> but I haven't been able to find anything of the sort.

奖励积分,如果你以某种方式可以乔恩斯基特前回答这个问题。

Bonus points if you can somehow answer this before Jon Skeet.

推荐答案

这只是System.Array的;它不是通用的。在这里看到一个简短的讨论:<一href=\"http://blogs.msdn.com/b/ericlippert/archive/2007/10/17/covariance-and-contravariance-in-c-part-two-array-covariance.aspx\">http://blogs.msdn.com/b/ericlippert/archive/2007/10/17/covariance-and-contravariance-in-c-part-two-array-covariance.aspx

It's just System.Array; it isn't generic. See here for a brief discussion: http://blogs.msdn.com/b/ericlippert/archive/2007/10/17/covariance-and-contravariance-in-c-part-two-array-covariance.aspx

这篇关于什么是开放式泛型类型数组[]的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆