LINQ To objects: Quicker ideas?

Posted by SDReyes on Stack Overflow See other posts from Stack Overflow or by SDReyes
Published on 2010-05-23T01:09:23Z Indexed on 2010/05/23 1:10 UTC
Read the original article Hit count: 509

Do you see a better approach to obtain and concatenate item.Number in a single string?

Current:

var numbers = new StringBuilder( );
// group is the result of a previous group by
var basenumbers = group.Select( item => item.Number );
basenumbers.Aggregate
(
  numbers,
  ( res, element ) => res.AppendFormat( "{0:00}", element )
);

© Stack Overflow or respective owner

Related posts about c#

Related posts about LINQ