Weighted Random File Selector.
I am planning out a program with several parts. I have used VB as a hobby for a few years but want to do this in C#. I’m not quit up on what should be a module, a sub-routine or what should be a class. Anyway this is part of what I want to do.

Perhaps from a comma delimited text file, a sub-routine would read in or index a list of files that also have a percentage rating associated with each one.
When called, the program would select one file from the list in a weighted random fashion. In other words the file that had a rating of 10 % should come up approximately ten times as often as the file with a rating of 1 % but not in a predicable way.

Would this be just a little code or a lot?