Click here to Skip to main content
15,911,139 members
Home / Discussions / C#
   

C#

 
Questionabout c#.net Pin
rupmax30-Jun-08 21:39
rupmax30-Jun-08 21:39 
AnswerRe: about c#.net Pin
Christian Graus30-Jun-08 21:55
protectorChristian Graus30-Jun-08 21:55 
QuestionLINQ Pin
arkiboys30-Jun-08 21:23
arkiboys30-Jun-08 21:23 
AnswerRe: LINQ Pin
Christian Graus30-Jun-08 21:57
protectorChristian Graus30-Jun-08 21:57 
AnswerRe: LINQ Pin
Scott Dorman30-Jun-08 22:57
professionalScott Dorman30-Jun-08 22:57 
Questionsimple test Pin
blackjack215030-Jun-08 21:02
blackjack215030-Jun-08 21:02 
AnswerRe: simple test Pin
Christian Graus30-Jun-08 21:56
protectorChristian Graus30-Jun-08 21:56 
AnswerRe: simple test Pin
Scott Dorman30-Jun-08 23:00
professionalScott Dorman30-Jun-08 23:00 
There is a third option:
CallLogMethod(condition, "Message")
The CallLogMethod still evaluates the condition, but it gets passed in. This is similar to how Debug.WriteLineIf works.

In either case, I would go with option 2 or 3 and push the test into the method itself. This way, you guarantee that it will always be tested and tested the same way and it's one less thing to worry about at the calling site.

Scott Dorman
Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA

[Blog][Articles][Forum Guidelines]
Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai

QuestionPropertyGrid Pin
KBou30-Jun-08 20:53
KBou30-Jun-08 20:53 
AnswerRe: PropertyGrid Pin
leppie30-Jun-08 20:55
leppie30-Jun-08 20:55 
QuestionRe: PropertyGrid [modified] Pin
KBou30-Jun-08 21:05
KBou30-Jun-08 21:05 
AnswerRe: PropertyGrid Pin
stancrm30-Jun-08 22:39
stancrm30-Jun-08 22:39 
QuestionRe: PropertyGrid Pin
KBou30-Jun-08 22:49
KBou30-Jun-08 22:49 
AnswerRe: PropertyGrid Pin
leppie1-Jul-08 1:08
leppie1-Jul-08 1:08 
GeneralRe: PropertyGrid Pin
KBou1-Jul-08 1:26
KBou1-Jul-08 1:26 
GeneralRe: PropertyGrid Pin
leppie1-Jul-08 3:35
leppie1-Jul-08 3:35 
QuestionQuery about generating random but unique keys of 6 digits? Pin
Rocky#30-Jun-08 20:47
Rocky#30-Jun-08 20:47 
AnswerRe: Query about generating random but unique keys of 6 digits? Pin
leppie30-Jun-08 20:54
leppie30-Jun-08 20:54 
GeneralRe: Query about generating random but unique keys of 6 digits? Pin
Rocky#30-Jun-08 21:10
Rocky#30-Jun-08 21:10 
AnswerRe: Query about generating random but unique keys of 6 digits? Pin
N a v a n e e t h30-Jun-08 21:05
N a v a n e e t h30-Jun-08 21:05 
GeneralRe: Query about generating random but unique keys of 6 digits? Pin
Rocky#30-Jun-08 21:15
Rocky#30-Jun-08 21:15 
GeneralRe: Query about generating random but unique keys of 6 digits? Pin
N a v a n e e t h30-Jun-08 21:18
N a v a n e e t h30-Jun-08 21:18 
GeneralRe: Query about generating random but unique keys of 6 digits? Pin
Rocky#30-Jun-08 21:36
Rocky#30-Jun-08 21:36 
GeneralRe: Query about generating random but unique keys of 6 digits? Pin
leppie1-Jul-08 1:17
leppie1-Jul-08 1:17 
GeneralRe: Query about generating random but unique keys of 6 digits? Pin
Rocky#1-Jul-08 1:41
Rocky#1-Jul-08 1:41 

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.