Click here to Skip to main content
15,880,392 members
Home / Discussions / C#
   

C#

 
GeneralRe: Card shuffle program code help needed (code included) Pin
Richard MacCutchan7-Jun-20 21:51
mveRichard MacCutchan7-Jun-20 21:51 
GeneralRe: Card shuffle program code help needed (code included) Pin
Brian_TheLion8-Jun-20 19:15
Brian_TheLion8-Jun-20 19:15 
GeneralRe: Card shuffle program code help needed (code included) Pin
Richard MacCutchan8-Jun-20 21:30
mveRichard MacCutchan8-Jun-20 21:30 
GeneralRe: Card shuffle program code help needed (code included) Pin
Richard Deeming8-Jun-20 0:08
mveRichard Deeming8-Jun-20 0:08 
GeneralRe: Card shuffle program code help needed (code included) Pin
Brian_TheLion8-Jun-20 19:01
Brian_TheLion8-Jun-20 19:01 
GeneralRe: Card shuffle program code help needed (code included) Pin
Richard Deeming8-Jun-20 22:16
mveRichard Deeming8-Jun-20 22:16 
GeneralRe: Card shuffle program code help needed (code included) Pin
Brian_TheLion11-Jun-20 18:20
Brian_TheLion11-Jun-20 18:20 
AnswerRe: Card shuffle program code help needed Pin
OriginalGriff7-Jun-20 4:11
mveOriginalGriff7-Jun-20 4:11 
Firstly, Return is not a C# keyword: it's case sensitive, remember - so it's return instead.

Secondly, what
C#
return face + " of " + suit;
returns depends on the type of face and suit - if they are both strings, it'll work. If face is an integer, it'll work. If it's a special class, then it'll only work if you have overridden ToString in that class.

But basically, we can't directly help you - we can't run your code in isolation and get the same results you do.
So, it's going to be up to you.
Fortunately, you have a tool available to you which will help you find out what is going on: the debugger. If you don't know how to use it then a quick Google for "Visual Studio debugger" should give you the info you need.

Put a breakpoint on the first line in the function, and run your code through the debugger. Then look at your code, and at your data and work out what should happen manually. Then single step each line checking that what you expected to happen is exactly what did. When it isn't, that's when you have a problem, and you can back-track (or run it again and look more closely) to find out why.

Sorry, but we can't do that for you - time for you to learn a new (and very, very useful) skill: debugging!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!

GeneralRe: Card shuffle program code help needed Pin
Brian_TheLion7-Jun-20 15:37
Brian_TheLion7-Jun-20 15:37 
GeneralRe: Card shuffle program code help needed Pin
OriginalGriff7-Jun-20 20:38
mveOriginalGriff7-Jun-20 20:38 
GeneralRe: Card shuffle program code help needed Pin
Brian_TheLion8-Jun-20 19:12
Brian_TheLion8-Jun-20 19:12 
GeneralRe: Card shuffle program code help needed Pin
F-ES Sitecore9-Jun-20 2:31
professionalF-ES Sitecore9-Jun-20 2:31 
GeneralRe: Card shuffle program code help needed Pin
Brian_TheLion9-Jun-20 19:56
Brian_TheLion9-Jun-20 19:56 
GeneralRe: Card shuffle program code help needed Pin
Brian_TheLion11-Jun-20 18:17
Brian_TheLion11-Jun-20 18:17 
QuestionBest way to store methods in a database? Pin
arnold_w5-Jun-20 22:42
arnold_w5-Jun-20 22:42 
QuestionRe: Best way to store methods in a database? Pin
Richard MacCutchan5-Jun-20 22:58
mveRichard MacCutchan5-Jun-20 22:58 
AnswerRe: Best way to store methods in a database? Pin
arnold_w5-Jun-20 23:56
arnold_w5-Jun-20 23:56 
GeneralRe: Best way to store methods in a database? Pin
Richard MacCutchan6-Jun-20 0:10
mveRichard MacCutchan6-Jun-20 0:10 
GeneralRe: Best way to store methods in a database? Pin
arnold_w6-Jun-20 0:14
arnold_w6-Jun-20 0:14 
AnswerRe: Best way to store methods in a database? Pin
kalberts6-Jun-20 5:22
kalberts6-Jun-20 5:22 
GeneralRe: Best way to store methods in a database? Pin
Richard MacCutchan6-Jun-20 5:26
mveRichard MacCutchan6-Jun-20 5:26 
AnswerRe: Best way to store methods in a database? Pin
Eddy Vluggen5-Jun-20 23:48
professionalEddy Vluggen5-Jun-20 23:48 
AnswerRe: Best way to store methods in a database? Pin
Richard Deeming8-Jun-20 0:05
mveRichard Deeming8-Jun-20 0:05 
GeneralRe: Best way to store methods in a database? Pin
#realJSOP9-Jun-20 23:25
mve#realJSOP9-Jun-20 23:25 
GeneralRe: Best way to store methods in a database? Pin
kalberts10-Jun-20 10:58
kalberts10-Jun-20 10:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.