Generic methods and method overloading

前端 未结 6 1202
情歌与酒
情歌与酒 2020-11-29 09:30

Method overloading allows us to define many methods with the same name but with a different set of parameters ( thus with the same name but different signature ).

A

6条回答
  •  臣服心动
    2020-11-29 09:55

    Yes. Off the top of my head, if you call A.MyMethod(1);, it will always run the second method. You'd have to call A.MyMethod(1); to force it to run the first.

提交回复
热议问题