pricelist | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

pricelist

How to create Pricelist on C#, please help mi out?

29th Oct 2018, 2:11 PM
Isaac Aku
Isaac Aku - avatar
1 Answer
+ 1
You could use a Dictionary<U,V> so long as your items are all named differently. Dictionary<string, float> priceList = new Dictionary<string, float>(); priceList.Add("Socks", 4.99f); priceList.Add("Pants", 5.99f); priceList.Add("T-Shirt", 14.99f); And so on.....
26th Apr 2019, 11:44 AM
Gareth Stephens