D
Dan Holmes
List<int> has as one of its constructors a collection so i thought
instead of creating a new class i would use an anonymous method
List<int> li = new List<int>(
delegate { yield return 5; yield return 9; })
);
That is not legal. there isn't really anything to fix here but just in
case some one else didn't know i thought i would post it.
dan
Is there any syntax to simulate this? I have tried {1, 2, 3} and other
sorts of array type initializers but i can't make anything work.
instead of creating a new class i would use an anonymous method
List<int> li = new List<int>(
delegate { yield return 5; yield return 9; })
);
That is not legal. there isn't really anything to fix here but just in
case some one else didn't know i thought i would post it.
dan
Is there any syntax to simulate this? I have tried {1, 2, 3} and other
sorts of array type initializers but i can't make anything work.