Skip to content

Comment on Exceptions (2003)

Comments

You can make methods easily return multiple values in C# with Tuples. They are very handy.

For extremely low values of "easily". C#'s lack of pattern matching and tuple syntax makes dealing with tuples in C# a complete pain in the ass. It's ugly, annoying, code, in general.

P.S. You can do this in pretty much any language. Just define pair, triplet, etc.

For the sake of the sanity of your future co-workers, I really hope you are kidding.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.