How to implement method chaining?

后端 未结 4 1937
死守一世寂寞
死守一世寂寞 2021-02-08 20:27

In C# how does one implement the ability to chain methods in one\'s custom classes so one can write something like this:

myclass.DoSomething().DosomethingElse(x)         


        
4条回答
提交回复
热议问题