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)
Your methods should return this or a reference to another (possibly new) object depending on exactly what you want to acheive
this