Click here to Skip to main content
15,884,388 members
Home / Discussions / C#
   

C#

 
GeneralRe: C#_Error "Namespace cannot directly contain..." Pin
Deborah Palmer McCain11-Jan-12 5:50
Deborah Palmer McCain11-Jan-12 5:50 
GeneralRe: C#_Error "Namespace cannot directly contain..." Pin
Roger Wright11-Jan-12 18:18
professionalRoger Wright11-Jan-12 18:18 
GeneralRe: C#_Error "Namespace cannot directly contain..." Pin
Deborah Palmer McCain12-Jan-12 5:57
Deborah Palmer McCain12-Jan-12 5:57 
AnswerRe: C#_Error "Namespace cannot directly contain..." Pin
OriginalGriff10-Jan-12 22:19
mveOriginalGriff10-Jan-12 22:19 
GeneralRe: C#_Error "Namespace cannot directly contain..." Pin
Deborah Palmer McCain11-Jan-12 5:55
Deborah Palmer McCain11-Jan-12 5:55 
GeneralRe: C#_Error "Namespace cannot directly contain..." Pin
killabyte11-Jan-12 16:49
killabyte11-Jan-12 16:49 
GeneralRe: C#_Error "Namespace cannot directly contain..." Pin
OriginalGriff11-Jan-12 21:40
mveOriginalGriff11-Jan-12 21:40 
GeneralRe: C#_Error "Namespace cannot directly contain..." Pin
BillWoodruff12-Jan-12 16:12
professionalBillWoodruff12-Jan-12 16:12 
I prefer K&R to 1TBS (devotees of both cults can be fanatics), because I think it's more readable, and more easily maintainable. WhiteSmith's I've never personally seen used at any place I've worked.

I maintain two simple macros in UltraEdit that will convert K&R<=>1TBS, if I should ever need to.

But, I think your "shibboleth" example code is a bit mis-leading: nothing stops you from using "pure" K&S and writing:
if(condition}
{
   statement;
}
Or even:
if (condition) { statement; }
I've asked the braces directly how they feel about having only one statement, and they assure me they do not feel neglected or lonely Smile | :)

I think lack of braces around one simple and short statement, following an if-clause is seldom written with braces no matter what style of formatting you use.

Where omitting the braces would really "bother" me would be when the the single statement following the if-clause was so bloody long that it overflowed the text-working-area boundaries to be several lines long !

But, of course, you are, as usual, bulls-eye-center, when you emphasize you may not have personal choice if you go to work on some project where there are code formatting guidelines in place for all team members.

Thank goodness C# does not allow multiple statements separated by colons, or "line-continuation" characters, as in the late Pleistocene when VB roamed the savannas, and real men did not eat quiche and programmed only in C and assembly language.

best, Bill
"It is the mark of an educated mind to be able to entertain a thought without accepting it." Aristotle

GeneralRe: C#_Error "Namespace cannot directly contain..." Pin
OriginalGriff12-Jan-12 21:08
mveOriginalGriff12-Jan-12 21:08 
GeneralRe: C#_Error "Namespace cannot directly contain..." Pin
BobJanova12-Jan-12 23:33
BobJanova12-Jan-12 23:33 
QuestionGamebot / find images on grid / scrabulizer etc Pin
LordNeverwinter10-Jan-12 7:38
LordNeverwinter10-Jan-12 7:38 
AnswerRe: Gamebot / find images on grid / scrabulizer etc Pin
Alan Balkany10-Jan-12 8:21
Alan Balkany10-Jan-12 8:21 
GeneralRe: Gamebot / find images on grid / scrabulizer etc Pin
LordNeverwinter12-Jan-12 1:38
LordNeverwinter12-Jan-12 1:38 
GeneralRe: Gamebot / find images on grid / scrabulizer etc Pin
Alan Balkany13-Jan-12 4:09
Alan Balkany13-Jan-12 4:09 
GeneralRe: Gamebot / find images on grid / scrabulizer etc Pin
LordNeverwinter12-Jan-12 19:54
LordNeverwinter12-Jan-12 19:54 
AnswerRe: Gamebot / find images on grid / scrabulizer etc Pin
BillWoodruff12-Jan-12 16:18
professionalBillWoodruff12-Jan-12 16:18 
GeneralRe: Gamebot / find images on grid / scrabulizer etc Pin
LordNeverwinter12-Jan-12 19:41
LordNeverwinter12-Jan-12 19:41 
QuestionHow to check that a character can be encoded with codepage 1252? Pin
Bernhard Hiller10-Jan-12 3:48
Bernhard Hiller10-Jan-12 3:48 
AnswerRe: How to check that a character can be encoded with codepage 1252? Pin
Luc Pattyn10-Jan-12 4:24
sitebuilderLuc Pattyn10-Jan-12 4:24 
GeneralRe: How to check that a character can be encoded with codepage 1252? Pin
Bernhard Hiller10-Jan-12 21:13
Bernhard Hiller10-Jan-12 21:13 
AnswerRe: How to check that a character can be encoded with codepage 1252? Pin
jschell11-Jan-12 9:27
jschell11-Jan-12 9:27 
QuestionC# RTD + .Net Remoting Pin
ZawMinTun9-Jan-12 23:01
ZawMinTun9-Jan-12 23:01 
QuestionCalling java from C# Pin
KASR19-Jan-12 21:32
KASR19-Jan-12 21:32 
AnswerRe: Calling java from C# Pin
OriginalGriff9-Jan-12 21:41
mveOriginalGriff9-Jan-12 21:41 
AnswerRe: Calling java from C# Pin
David Skelly9-Jan-12 22:16
David Skelly9-Jan-12 22:16 

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.