Is there a C# equivalent to the Python := (an assignment expression)?
Is there a C# equivalent to the Python := (an assignment expression)? Question: Assignment expression Python 3.8 I like how it saves line. Example: for rule in rules: place = getPlace(rule) if place: print(f"Apply rule {rule.__name__} -> {place}") return place raise Exception(‘No rule found!’) ↓↓ for rule in rules: if place:= getPlace(rule): print(f"Apply rule {rule.__name__} …