Click here to Skip to main content
14,977,302 members
Please Sign up or sign in to vote.
1.24/5 (5 votes)
See more:
Write a C# program which use a method based approach to the code

What I have tried:

var lottery = new Lottery<string>();
lottery.Add("Mr. A", 1);
lottery.Add("Ms. B", 2);
lottery.Add("Ms. C", 3);
var winner = lottery.Draw(true);
Updated 13-Apr-21 3:24am
SeanChupas 13-Apr-21 9:10am
What is your question?
OriginalGriff 13-Apr-21 9:43am
"How do I get someone else to do my homework?"
SeanChupas 13-Apr-21 10:10am
Be a sports jock? Or a hot girl?
OriginalGriff 13-Apr-21 10:29am
This is the internet: "Where men are men, hot women are men, and 12 year old girls are FBI agents". :laugh:

1 solution

Sorry, but no one here is going to write the code for you*. Please read How to Write Code to Solve a Problem, A Beginner's Guide[^].

*No matter how many times you repost it.
CPallini 13-Apr-21 9:16am
Richard MacCutchan 13-Apr-21 9:23am
Thanks. I assume it was not you who gave 5 to the question.
CPallini 13-Apr-21 10:06am
You assume correctly.
As matter of fact, I never vote questions.
Maciej Los 13-Apr-21 15:03pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900