Seems you are having problems with lists and loops. First of all, you are using a collection initializer, which is only meant to initialize collections with a constant number of elements. To create a list of variable size, use this syntax:
List<data> myData = new List<data>();
Then just fill the list with data and it will dynamically resize according to your space requirements:
for(int i = 0; i < GetMax(); i++)
{
myData.Add(GetData(i));
}
The GetMax and GetData methods can be defined however you like. And they don't need to be methods... I just made them methods to make it clear that anything could go there. Here is an example of how they could be declared:
public int GetMax() { return 4; }
public data GetData(int index)
{
switch(i)
{
case 0: return new data("1", "Malaysia");
case 1: return new data("2", "HK");
case 2: return new data("3", "China");
case 3: return new data("4", "Singapore");
default: throw new Exception("Invalid");
}
}