Navigation

تخزين قيم داخل List

تخزين قيم داخل List, ublic int ID {get;set;} public int ObjectID {get;set;} public int ObjectTypeID {get;set;}


تخزين قيم داخل List 


C#
تخزين قيم داخل List

class Items
        {
                public int ID {get;set;}
                public int ObjectID {get;set;}
                public int ObjectTypeID {get;set;}
                public int ItemID {get;set;}
                public double Quantity {get;set;}
                public double FreeQuantity {get;set;}
                public double Price {get;set;}
                public double Discount {get;set;}
                public string Notes {get;set;}
        }





     private void Form1_Load(object sender, EventArgs e)
        {
            List<Items> lstItems = new List<Items>();

            lstItems.Add(new Items
            {
                ID = 1,
                ObjectID = 2,
                ObjectTypeID = 3,
                ItemID = 4,
                Quantity = 5,
                FreeQuantity = 6,
                Price = 7,
                Discount = 8,
                Notes ="Test"
            });
        }

مشاركة

أضف تعليق:

0 comments: