asiftasleem / nbuilder

Automatically exported from code.google.com/p/nbuilder
0 stars 0 forks source link

Create List of plain strings #91

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Is it possible to create just a List<String> and fill it with a certain 
pattern? Like, "ProductName1 ProductName2 ProductName3"?

Original issue reported on code.google.com by berndsch...@gmail.com on 14 Feb 2013 at 4:29

GoogleCodeExporter commented 8 years ago
No, but I don't see why you would need nbuilder for something like that, unless 
I'm misunderstanding what you're asking?

e.g.:

var list = Enumerable.Range(1, 10).Select(x => "ProductName" + x);

foreach (var item in list) Console.WriteLine(item);

Console.ReadLine();

Original comment by g...@garethdown.com on 14 Feb 2013 at 10:04

GoogleCodeExporter commented 8 years ago
Thanks for your quick reply.

Yes, that's exactly how I'm doing it at the moment. But it's kind of ugly. With 
the standard Nbuilder syntax, you can create all needed data in one command 
which looks nice and clean. Since my string list is logically a part of the 
other data generated by Nbuilder, it would be nice to get everything done in 
the same way. It doesn't look nice if you suddenly switch to another method of 
data generation inbetween. It's nothing serious though, just would be nice to 
have.

Original comment by berndsch...@gmail.com on 14 Feb 2013 at 10:20

GoogleCodeExporter commented 8 years ago
hi - i'll have a think about how this could be incorporated.

thanks

Original comment by garethdo...@googlemail.com on 18 Feb 2013 at 5:41