List<T> add method in C#
- by Nano HE
Hello.
As I know. List Add method works as below.
List<string> cities = new List<string>();
cities.Add("New York");
cities.Add("Mumbai");
cities.Add("Berlin");
cities.Add("Istanbul");
If I designed the data structure as this
List<object> lstObj = new List<object>();
if (true) // string members
{
…