public class Product
{
puclic Int Id = 0;
public string Name = "";
public List<Path> Path = null;
public void Product(Int id = 0,string name = "",List<Path> path = null)
{
Id = id;
Name = name;
Path =path;
}
}
public class Path
{
public string URL = "";
public void Path(string url= "")
{
URL = url;
}
}
ใช้งาน
Code (C#)
List<Product> lspd = New List<Product>();
for(Int i = 1;i<=10;i++)
{
List<Path> lp = new List<Path>();
for(int p = 1;p<10;p++)
{
lp.Add("Path Url " + i + "_" + p);
}
lspd.Add(New Product(i,"Boss " + i,lp))
}