Help Building A Blackjack Program

Jun 9 2008 4:46 PM
Hi, I'm new to C# and wanted to see a Blackjack program in action.  I got the source code from http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=119 (bottom of page).  The code was from Visual Studio 2002, but when I convert and try to build I get a couple of errors namely:

Error    2    foreach requires that the return type 'BlackJack.CardEnumerator' of 'BlackJack.Hand.GetEnumerator()' must have a suitable public MoveNext method and public Current property    C:\Documents and Settings\dfontanesi\My Documents\Visual Studio Projects\Blackjack\Dealer.cs    71    5    BlackJack

Error    4    foreach requires that the return type 'BlackJack.CardEnumerator' of 'BlackJack.Hand.GetEnumerator()' must have a suitable public MoveNext method and public Current property    C:\Documents and Settings\dfontanesi\My Documents\Visual Studio Projects\Blackjack\Player.cs    313    6    BlackJack

If anyone would be so kind as to open this in VS and help me get it to build that would be much appreciated.


Answers (2)