In Perl one can do the following
($a, $b, $c) = split(',', "aaa,bbb,ccc");
does anyone know if there is an equivalent in C# other than doing the following?
var elements = "aaa,bbb,ccc".Split(',');
var a = elements[0];
var b = elements[1];
var c = elements[2];
Or is there an alternative for doing the above more concisely?
No there is no other way to do this in C#.
But there is hope in .net – namely F# 😀
With this you could do