F# - What is array<'T>?

懵懂的女人 提交于 2019-12-04 06:50:54

The type array<'T> is an abbreviation, but not for the base type System.Array but for another generic type that represents arrays in F#, which is written as 'T[].

This means that

  • System.Array is the non-generic base type (where you cannot use indexing and you can only get elements as objects)

  • 'T[] and array<'T> mean exactly the same thing. They are the generic type which supports indexing and you get 'T values from it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!