How can I combine return and switch case statements?
return
switch case
I want something like
return switch(a) { case 1:\"lalala
I've created a Nuget package (FluentSwitch) that should do what you want. So you can do the following:
var result = myValue.Switch() .When(1, "lalala") .When(2, "blalbla") .When(3, "lolollo") .Else("default") .Value();