Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
maxxxxx
· 9y ago · 0 comments
I wish you could somehow define a return type for a function without having to declare a class. Maybe have the function return an anonymous class and then have the compiler infer that.
Comments
[–]
doty
9y ago
Don't the tuples with named values do that for you?
(string first, string middle, string last) LookupName(long id)
[–]
maxxxxx
OP
9y ago
Yes, saw this after a second reading. Very nice!
[–]
herbstein
9y ago
Look into the tuples added in this C# release too ;)