Can I assign each value in an array to separate variables in one line in C#? Here\'s an example in Ruby code of what I want:
irb(main):001:0> str1, str2
This is not possible in C#.
The closest thing I can think of is to use initialization in the same line with indexs
strArr = new string[]{"foo","bar"}; string str1 = strArr[0], str2 = strArr[1];