Click here to Skip to main content
15,909,651 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# coding standards Pin
Justin Perez6-Oct-07 7:51
Justin Perez6-Oct-07 7:51 
GeneralRe: C# coding standards Pin
GuyThiebaut6-Oct-07 8:01
professionalGuyThiebaut6-Oct-07 8:01 
GeneralRe: C# coding standards Pin
Guffa6-Oct-07 9:13
Guffa6-Oct-07 9:13 
AnswerRe: C# coding standards Pin
pmarfleet6-Oct-07 8:06
pmarfleet6-Oct-07 8:06 
GeneralRe: C# coding standards Pin
GuyThiebaut6-Oct-07 8:19
professionalGuyThiebaut6-Oct-07 8:19 
GeneralRe: C# coding standards Pin
pmarfleet6-Oct-07 8:26
pmarfleet6-Oct-07 8:26 
GeneralRe: C# coding standards Pin
Scott Dorman7-Oct-07 10:43
professionalScott Dorman7-Oct-07 10:43 
AnswerRe: C# coding standards Pin
Guffa6-Oct-07 9:40
Guffa6-Oct-07 9:40 
The variables that you declare in the class should be declared inside the method instead.

As the method is not using any data from the object instance, it should be static.

Method names are usually written in PascalCase, i.e. IsPrime.

To always use brackets around a block makes the code more readable, i.e:
if (testLimit % 2 == 0) {
   return false;
}

If the code in the method has a singe exit point, it's easier to follow.

---
single minded; short sighted; long gone;

GeneralRe: C# coding standards Pin
GuyThiebaut6-Oct-07 10:06
professionalGuyThiebaut6-Oct-07 10:06 
AnswerRe: C# coding standards Pin
Scott Dorman7-Oct-07 10:46
professionalScott Dorman7-Oct-07 10:46 
GeneralRe: C# coding standards Pin
GuyThiebaut7-Oct-07 10:55
professionalGuyThiebaut7-Oct-07 10:55 
QuestionInvoke Bug??? Pin
udikantz6-Oct-07 6:32
udikantz6-Oct-07 6:32 
AnswerRe: Invoke Bug??? Pin
lmoelleb6-Oct-07 6:36
lmoelleb6-Oct-07 6:36 
GeneralRe: Invoke Bug??? Pin
udikantz6-Oct-07 6:45
udikantz6-Oct-07 6:45 
QuestionOperator Overloading Pin
sinha@c#6-Oct-07 6:12
sinha@c#6-Oct-07 6:12 
AnswerRe: Operator Overloading Pin
lmoelleb6-Oct-07 6:24
lmoelleb6-Oct-07 6:24 
AnswerRe: Operator Overloading Pin
Pete O'Hanlon7-Oct-07 10:38
mvePete O'Hanlon7-Oct-07 10:38 
AnswerRe: Operator Overloading Pin
Scott Dorman7-Oct-07 10:47
professionalScott Dorman7-Oct-07 10:47 
QuestionHow to determine best possible combination to a C# ListArray? Pin
humblepgmr6-Oct-07 4:10
humblepgmr6-Oct-07 4:10 
AnswerRe: How to determine best possible combination to a C# ListArray? Pin
humblepgmr6-Oct-07 4:47
humblepgmr6-Oct-07 4:47 
AnswerRe: How to determine best possible combination to a C# ListArray? Pin
Guffa6-Oct-07 6:25
Guffa6-Oct-07 6:25 
AnswerRe: How to determine best possible combination to a C# ListArray? Pin
lmoelleb6-Oct-07 6:33
lmoelleb6-Oct-07 6:33 
QuestionFinalize and Dispose Pin
Blumen6-Oct-07 2:29
Blumen6-Oct-07 2:29 
AnswerRe: Finalize and Dispose Pin
Simon P Stevens6-Oct-07 2:47
Simon P Stevens6-Oct-07 2:47 
GeneralRe: Finalize and Dispose Pin
Blumen6-Oct-07 3:39
Blumen6-Oct-07 3:39 

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.