Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Or just use an anonymous type:

  var simple = new { Field1 = "foo", Field2 = "bar" };




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: