You can cheat a bit by giving class FooBar an implicit constructor (requires latest version of C# for the tuple support):
public class FooBar
{
public string foo;
public string bar;
public static implicit operator FooBar((string, string) init)
{
return new FooBar{ foo = init.Item1, bar = init.Item2 };
}
}
Then code like this will work:
var fooBars = new FooBar[]
{
("Foo1", "Bar1"),
("Foo2", "Bar2")
};
OR
FooBar[] fooBars =
{
("Foo1", "Bar1"),
("Foo2", "Bar2")
};
And then:
foreach (var fooBar in fooBars)
Console.WriteLine($"foo = {fooBar.foo}, bar = {fooBar.bar} ");
which seems fairly close to what you're aiming for (albeit with parentheses instead of braces).
But normally you'd just use the new FooBar("Foo", "Bar")
syntax as per the other answer.