Oh okay. That makes sense. And just so I know. Tell me again how to allow Visual Studio 2012 to auto-insert the closing braces and other things in pairs. It's with the Power Tools Extension, right? I was looking at that, though I couldn't seem to find that particular set of options, for that would certainly make my life easier.
From: [email protected] [mailto:[email protected]] On Behalf Of David Richards Sent: Wednesday, February 13, 2013 10:42 PM To: ozDotNet Subject: Re: does anyone know a good technique to keep track of your braces in C#? They don't quite go anywhere you want. They can go in far more places than are actually necessary but let not worry about that for now. You have a set for the namespace. You have a set for each method or property in that namespace. You have a set for any compound statements. You have a set for any array initialisation. I've probably forgotten some cases at the moment but that's probably 99% of cases there. You can also, for example, put them in case statements within a switch (oh yeah, switch statements have them as well) but the break statement makes them superfluous. Although it would probably make them more consistent. Hmm, it's entirely possible I'm not understanding what you're saying. David "If we can hit that bullseye, the rest of the dominoes will fall like a house of cards... checkmate!" -Zapp Brannigan, Futurama On 14 February 2013 13:33, Katherine Moss <[email protected]<mailto:[email protected]>> wrote: Please correct me if I am wrong on this. You're telling me that braces are free for the programmer to place them where they want in C#? I know that in most of the demos I have from books, there are always braces in particular places every time with no fail. Is this a C# convention, or is this a standard that Wily is using? For instance: Namespace Demo { Static void main(string [] args) } { Console.WriteLine("this is a demo"); Console.ReadKey(); } } } Or something like that. I'm not sure since I don't have the file open in front of me, but are you saying that is just a chosen way of writing it and that people are relatively free with braces? And about other languages. I chose C# because it offers the power of C++ without the complexity. And I plan to learn F# as well one of these days, though isn't that more of a math language for calculation programs and such like that? But thanks to Roslyn, I can learn easier with C# interactive. And I don't use VB for moral reasons. No offense to those on this list who love it, but isn't it kind of the malware author's language? From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of David Richards Sent: Wednesday, February 13, 2013 7:50 PM
