2 ms·
Not sure to get the Tuple (#347) ... Why not use an anonymous type or the already existing Tuple class ?
by guiomie 12y ago
Not sure to get the Tuple (#347) ... Why not use an anonymous type or the already existing Tuple class ?
- louthy 12y agoAnonymous types can't be returned from a method. Well, they can, but not with any kind of safety (casting to object, or dynamic). Using tuples is all about representing a type by its 'shape', not its name. With anonymous types there's no shape declaration; but I could imagine that it would be useful for C# to allow implicit casting of anonymouse types to tuples (where the shapes are equal).