Click here to Skip to main content
14,271,310 members
   

C#

 
AnswerRe: C#In Canon Camera Development, find error Device Busy Pin
Gerry Schmitz20-Mar-19 5:15
mveGerry Schmitz20-Mar-19 5:15 
QuestionI found this strange in C# Pin
Brian_TheLion19-Mar-19 13:06
memberBrian_TheLion19-Mar-19 13:06 
AnswerRe: I found this strange in C# Pin
Eddy Vluggen19-Mar-19 13:33
mveEddy Vluggen19-Mar-19 13:33 
GeneralRe: I found this strange in C# Pin
Brian_TheLion19-Mar-19 14:23
memberBrian_TheLion19-Mar-19 14:23 
GeneralRe: I found this strange in C# Pin
Eddy Vluggen20-Mar-19 1:26
mveEddy Vluggen20-Mar-19 1:26 
AnswerRe: I found this strange in C# Pin
Dave Kreskowiak19-Mar-19 14:24
mveDave Kreskowiak19-Mar-19 14:24 
GeneralRe: I found this strange in C# Pin
Brian_TheLion19-Mar-19 14:51
memberBrian_TheLion19-Mar-19 14:51 
GeneralRe: I found this strange in C# Pin
Dave Kreskowiak19-Mar-19 15:34
mveDave Kreskowiak19-Mar-19 15:34 
Yeah, you've thrown all the variables at the class level. That's bad. You have no reason to do that at all.

Rewrite the thing from scratch, but think about what each method is going to handle, what it's going to need to do that job, and what it's going to return. Each method is going to need its own variables, so declare them in that method.

In this code, you've got no reason to have ANY class level variables at all.

GeneralRe: I found this strange in C# Pin
Brian_TheLion20-Mar-19 0:11
memberBrian_TheLion20-Mar-19 0:11 
AnswerRe: I found this strange in C# Pin
Richard MacCutchan19-Mar-19 22:59
protectorRichard MacCutchan19-Mar-19 22:59 
GeneralRe: I found this strange in C# Pin
Brian_TheLion19-Mar-19 23:28
memberBrian_TheLion19-Mar-19 23:28 
AnswerRe: I found this strange in C# Pin
Gerry Schmitz20-Mar-19 5:10
mveGerry Schmitz20-Mar-19 5:10 
QuestionLooking for a good book to learn C# Pin
Brian_TheLion18-Mar-19 20:07
memberBrian_TheLion18-Mar-19 20:07 
AnswerRe: Looking for a good book to learn C# Pin
OriginalGriff18-Mar-19 21:01
protectorOriginalGriff18-Mar-19 21:01 
GeneralRe: Looking for a good book to learn C# Pin
Brian_TheLion19-Mar-19 20:44
memberBrian_TheLion19-Mar-19 20:44 
GeneralRe: Looking for a good book to learn C# Pin
OriginalGriff19-Mar-19 21:17
protectorOriginalGriff19-Mar-19 21:17 
AnswerRe: Looking for a good book to learn C# Pin
Ralf Meier18-Mar-19 22:28
professionalRalf Meier18-Mar-19 22:28 
GeneralRe: Looking for a good book to learn C# Pin
OriginalGriff18-Mar-19 22:35
protectorOriginalGriff18-Mar-19 22:35 
GeneralRe: Looking for a good book to learn C# Pin
Ralf Meier19-Mar-19 1:07
professionalRalf Meier19-Mar-19 1:07 
GeneralRe: Looking for a good book to learn C# Pin
Brian_TheLion19-Mar-19 20:44
memberBrian_TheLion19-Mar-19 20:44 
GeneralRe: Looking for a good book to learn C# Pin
OriginalGriff19-Mar-19 21:12
protectorOriginalGriff19-Mar-19 21:12 
AnswerRe: Looking for a good book to learn C# Pin
Richard MacCutchan18-Mar-19 22:45
protectorRichard MacCutchan18-Mar-19 22:45 
GeneralRe: Looking for a good book to learn C# Pin
Brian_TheLion19-Mar-19 11:36
memberBrian_TheLion19-Mar-19 11:36 
GeneralRe: Looking for a good book to learn C# Pin
Richard MacCutchan19-Mar-19 22:54
protectorRichard MacCutchan19-Mar-19 22:54 
AnswerRe: Looking for a good book to learn C# Pin
Gerry Schmitz19-Mar-19 5:46
mveGerry Schmitz19-Mar-19 5:46 

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.