It can be much cleaner, declarative, and enjoyable in C #, for example:
And it can be used then:
var myInits = new[] {"Some init value", "Some init value 2", "Another Value 3"}; var myMacroStuff = GetMacroStuff(myInits);
By the way, we can offer you a solution on how to βdo thingsβ correctly and beautifully, if you just describe what you want, and not just show us the code that we donβt have, and how to use it, and ask how to translate it literally . Because literal translation can be so unnatural and ugly in the .NET world, and you have to maintain this ugliness ... We do not want you to be in this position :)
source share