For our case lets consider the string type. The following code exemplifies how an array of string can be converted to a generic list of string type.
string[] arrayOfString = new string[] { "Just", "an", "example."};
List listOfString = new List(arrayOfString);
And yes there you have it! Its just that simple.
No comments:
Post a Comment