3 ms·
At least C# doesn't require you to allocate a file for your class, and a simple two-field class should consume no more than 5 lines of code. And if you're willi
by barrkel 17y ago
At least C# doesn't require you to allocate a file for your class, and a simple two-field class should consume no more than 5 lines of code. And if you're willing to use a generic tuple type, you don't need to declare a class at all; just use Tuple<Foo,Bar> as needed.
- dmnd 17y agoOr just use an anonymous type: var simple = new { Field1 = "foo", Field2 = "bar" };