Method chaining is cool!

  1. var jack = new Person().SetName(“Jack”)
  2.                                            .SetAge(30)
  3.                                            .SetCity(“NY”)
  4.                                            .Save();

How to implement this?
https://www.codeproject.com/articles/640997/fluent-interfaces-and-method-chaining-in-csharp

http://prasadhonrao.com/method-chaining-design-pattern-in-c-and-javascript/

Posted in Blog Tagged with: ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*