Example #1
0
        public void printing()
        {
            List <string> goodClothingBrands = new List <string>()
            {
                "Abercrombie", "Hollister", "Tommy Hilfiger"
            };
            List <string> goodCologneBrands = new List <string>()
            {
                "Calvin Klein", "Paco Rabane", "Dior"
            };



            //Creating the List OF Custom Type Uni_Student
            List <Uni_Student> uniStudents = new List <Uni_Student>();

            for (int i = 0; i < goodCologneBrands.Count; i++)
            {
                Uni_Student uniStud = new Uni_Student();//creating a new uniStud object and add it to the list
                uniStud.FName = goodClothingBrands[i];
                uniStud.LName = goodCologneBrands[i];
                uniStudents.Add(uniStud);
            }

            foreach (Uni_Student uniStud in uniStudents)
            {
                Wr_L(uniStud.TheFullName);
            }
            //Without the .TheFullName it will print Lists_Of_Cust_Typ which is the name of the namespace

            takeStud(uniStudents[0]);
            Wr_L(uniStudents[0].TheFullName);
        }
Example #2
0
 public void takeStud(Uni_Student uniStud)
 {
     uniStud.FName = "Moschino";
     Wr_L(uniStud.TheFullName);
 }