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.
Loading
Jonathan WeinblattPosted Jun 9, 2008, 10:06 PM
Anna HawksPosted Jun 9, 2008, 5:13 PM
However, after a quick Google on the error message, I found that it looks like the author has done a revision of that very program here: http://www.codeproject.com/KB/cs/blackjack.aspx