In C#, an anonymous type can be as follows:
method doStuff(){ var myVar = new { a = false, b = true } if (myVar.a) {
In C# 7 we can leverage named tuples to do the trick:
(bool a, bool b) myVar = (false, true); if (myVar.a) { myVar.b = true; }