Redundancy in C#?

前端 未结 17 1602
猫巷女王i
猫巷女王i 2021-02-13 19:28

Take the following snippet:

List distances = new List();

Was the redundancy intended by the language designers? If so, wh

17条回答
  •  春和景丽
    2021-02-13 19:40

    A historical artifact of static typing / C syntax; compare the Ruby example:

    distances = []
    

提交回复
热议问题