What is this new[] a shorthand for?

前端 未结 4 796
一整个雨季
一整个雨季 2020-12-07 02:35

I can\'t seem to find any documentation on what new[] is supposed to be. From the example below it seems to be an object array shorthand

var json = new[] {
          


        
4条回答
  •  感动是毒
    2020-12-07 02:41

    The notation is an implicitly typed array declaration.

    In your case, it is a array of object arrays.

提交回复
热议问题