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
No, but you can initialize an array of strings:
string[] strings = new string[] {"hey", "now"};
Although that's probably not too useful for you. Frankly its not hard to put them on two lines:
string str1 = "hey"; string str2 = "now";