Beispiel #1
0
 public HomeController()
 {
     mang = new List <hehe>();
     for (int i = 1; i < 5; i++)
     {
         hehe h = new hehe();
         h.ID   = i;
         h.Name = "thang " + i;
         mang.Add(h);
     }
 }
Beispiel #2
0
    void Start()
    {
        hehe x = new hehe();

        print(x.a); //0
        x.ChangeDate(4);
        print(x.a); //4
        object o = x;

        print(((hehe)o).a); //4
        ((hehe)o).ChangeDate(2);
        print(((hehe)o).a); //4
    }