Answer: With the help of Insert static function of List Collection,we can insert any item.
List<int> values = new List<int>();
values.Add("1"); //Output Would be:: 1
values.Add("3"); //Output Would be:: 1,3
values.Insert(1, "2"); //Output Would be:: 1,2,3
Asked In: Many Interviews |
Alert Moderator