C# not inferring overloaded method via return type

前端 未结 6 1655
我在风中等你
我在风中等你 2021-01-21 05:17

I\'m writing a C# programlet to crawl a directory and give me a listing of files whose date in the last CSV line is less than the current date. Since this is a programlet, I\'m

6条回答
  •  爱一瞬间的悲伤
    2021-01-21 05:42

    Correct, C# does not let you overload methods on return types only.

    Consider what happens if I just call dateStringGetter() without assignment of return value.

    Which method have I called?

提交回复
热议问题