using System;usingSystem.Collections.Generic;using System.Linq;usingSystem.Text; namespaceConsoleApplication13{ enum ItemCategory {Women, Men, Girls, Boys,Babies } class Category { ItemCategoryIC; public string name; public int number_of_units; public double unit_price; publicCategory(ItemCategory x, string y, int z, double k) { name = y; number_of_units = z; unit_price= k; IC = x; } public void ShowInfo() { Console.WriteLine("item category is : " + IC + ";\n item name : " + name + ";\n number of units : " +number_of_units + ";\n unit price : "+unit_price+"."); } } class Program { static void Main() { Categoryt = new Category(ItemCategory.Girls,"toys",5,2.5); t.ShowInfo(); Console.ReadLine(); } }}
Comments
Leave a comment