is this possible with linq?
C#
1
Posts
1
Posters
0
Views
1
Watching
-
I want to create an array of class T, and initialize all objects with new T, like:
T[] CreateInitializedArray(int size) where T : new()
{
var arr = new T[size];
for (int i = 0; i < size; i++)
arr[i] = new T();
return arr;
}I was curious if LINQ provided a way to do just that. Best, John
-- Log Wizard - a Log Viewer that is easy and fun to use!