KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
It is possible to create an array at compile time like; int[] myValues = new int[] { 1, 2, 3 } ; But I would like to do something like this; List<int> myValues = new List<int>() { 1, 2, 3 }; The compiler says No. Is there a way to do this (C# 2.0) without using LINQ (C# 3.0)?
Tags (comma-separated)
Save Edits
Cancel