Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Array of indexers?
Message
From
27/07/2009 10:33:06
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 3.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01414024
Message ID:
01414739
Views:
51
>Glad you got it sorted - is this an exercise ? or do you have a real life need for it ?

Mostly an exercise for myself. I'm trying to teach myself C# and the .Net Framework by doing. So I'm fooling around by writing small programs. Right now I'm playing around with a lottery program that tracks the our Lotto 649 and matches the numbers drawn to the numbers played. It also allows me to mess with SQL server a little as well as C#. The particular use I had for the indexers was in matching the numbers drawn to 'played' number lines.

I could have used an array and then written code around in other functions that count the number of matches, rearrange the matched numbers into a printable string etc, but it seemed like it might be more elegant to create a class with it's own internal methods - an indexer. Since I want to be able to match more than one line played in any one draw, it meant using an array of indexers.

Thanks to Bonnie's replies to other people, I've managed to figure out the back end of the thing. I wrote it with the front end being windows forms calling to a web service that talks to BOs that talk to data access code that talks to the database.

It's been fun and a good learning experience. I'll tell you one thing for sure. Read everything Bonnie puts on the UT.

Now it's time to figure out something else to play with to learn other things. It's easy to see how much I don't know.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform