Hi...I came here because I had problems posting at the C# Corner. Hopefully this forum will actually post my question instead of deleting it once I hit post....
I'm working on homework. Yes, I have given it quite some effort, from experimenting to researching. I've even looked everywhere for a C# API documentation, but can't find one. What I'm attempting to do would be so much easier to do with an array, but I have to use an enumeration. In Java, QBasic, HTML, and Visual Basic, I never saw an enumeration, so seeing this introduced in C# (which I'm gradually learning) is throwing me for a loop.
Just to prove I at least know what I'm trying to do and that I'm not entirely stupid, I'll explain how I would code it if it were an array of objects of type Carpet(String type, int priceTimes100). The casing may not be correct, but I'm used to Java casing:
String[,] carpet = new string[8,1];
carpet[0,0] = "Berber";
carpet[0,1] = 810;
carpet[1,0] = "Cable";
carpet[1,1] = 1827;
//...etc
for (int i = 0; i < carpet.length; i++)
[INDENT]Console.Write((i+1) + ": " + carpet[i, 0] + " - $" + ((double)carpet[i,1] / 100));[/INDENT]
Here's the enumeration I'm working with. The prices will be cast to doubles and divided by 100. I've tried everything I can think of to retrieve this data in a for loop, and nothing works.
enum Carpet { Berber = 810, Cable = 1827, Frieze = 747, Indoor_Outdoor = 810, Plush = 1251, Saxony = 1201, Shag = 1205, Sisal = 3801, Textured = 1827 }
I would appreciate any help I can get. Thanks!