.net array - difference between “Length”, “Count()” and “Rank”

前端 未结 6 2315
时光说笑
时光说笑 2020-12-15 15:19

What\'s the difference between \"Length\", \"Count()\" and \"Rank\" for .net array?

6条回答
  •  旧时难觅i
    2020-12-15 16:03

    • Length is a property returning the number of elements in an Array.
    • Count() is a LINQ extension that does the same on an IEnumerable. Optionally, it can take a predicate as parameter, and will return the number of elements that satisfy it.
    • Rank is a property returning the number of dimensions in an Array.

提交回复
热议问题