Method with same name and signature but different return type in C#

后端 未结 9 1787
南旧
南旧 2020-12-08 01:01

I had an interview where I was asked the following:

Question: A method with same name and signature but different return type. Is it possible and what is this type c

9条回答
  •  猫巷女王i
    2020-12-08 01:32

    You can use a dynamic return type:

    • dynamic (C# Reference)
    • Using Type dynamic (C# Programming Guide)

提交回复
热议问题