Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. where I can find Coding Conventions for C#?

where I can find Coding Conventions for C#?

Scheduled Pinned Locked Moved C#
csharpquestion
13 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Lost User

    thx gicio

    J Offline
    J Offline
    James T Johnson
    wrote on last edited by
    #4

    As Tom pointed out camel and Pascal casing are commonly used. I use camel casing for private objects (fields, properties, methods, and local variables). I use Pascal casing for protected/public objects (fields, properties, methods). My style changes from time to time though; at one point I was prefixing private variables with an underscore. James Simplicity Rules!

    1 Reply Last reply
    0
    • L Lost User

      thx gicio

      N Offline
      N Offline
      Nick Parker
      wrote on last edited by
      #5

      On another note for notation... I have read that Microsoft is dropping the idea of Hungarian notation for C#, all except for the i before the declaration of an interface. Nick Parker

      T 1 Reply Last reply
      0
      • N Nick Parker

        On another note for notation... I have read that Microsoft is dropping the idea of Hungarian notation for C#, all except for the i before the declaration of an interface. Nick Parker

        T Offline
        T Offline
        Tom Archer
        wrote on last edited by
        #6

        Yes, hungarian notation is definitely being played down by MS. Of course, since we don't see any source code any more (unlike with MFC) it really doesn't matter :) Cheers, Tom Archer Author, Inside C# Author, Visual C++.NET Bible A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the af

        N 1 Reply Last reply
        0
        • T Tom Archer

          Yes, hungarian notation is definitely being played down by MS. Of course, since we don't see any source code any more (unlike with MFC) it really doesn't matter :) Cheers, Tom Archer Author, Inside C# Author, Visual C++.NET Bible A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the af

          N Offline
          N Offline
          Nick Parker
          wrote on last edited by
          #7

          Tom Archer wrote: since we don't see any source code any more (unlike with MFC) it really doesn't matter I don't think this means we should start naming our variables strNumber and iWord however. :) Nick Parker

          T 1 Reply Last reply
          0
          • N Nick Parker

            Tom Archer wrote: since we don't see any source code any more (unlike with MFC) it really doesn't matter I don't think this means we should start naming our variables strNumber and iWord however. :) Nick Parker

            T Offline
            T Offline
            Tom Archer
            wrote on last edited by
            #8

            My point was the opposite; that we are no longer bound by an underlying framework to accept that framework's naming conventions. Cheers, Tom Archer Author, Inside C# Author, Visual C++.NET Bible A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the af

            N 1 Reply Last reply
            0
            • T Tom Archer

              My point was the opposite; that we are no longer bound by an underlying framework to accept that framework's naming conventions. Cheers, Tom Archer Author, Inside C# Author, Visual C++.NET Bible A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the af

              N Offline
              N Offline
              Nick Parker
              wrote on last edited by
              #9

              I know Tom, I was only giving you a hard time, sorry :-D Nick Parker

              T 1 Reply Last reply
              0
              • N Nick Parker

                I know Tom, I was only giving you a hard time, sorry :-D Nick Parker

                T Offline
                T Offline
                Tom Archer
                wrote on last edited by
                #10

                Sorry mate. It's late and I am sooooooooo over this chapter :) Cheers, Tom Archer Author, Inside C# Author, Visual C++.NET Bible A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the af

                N 1 Reply Last reply
                0
                • T Tom Archer

                  Sorry mate. It's late and I am sooooooooo over this chapter :) Cheers, Tom Archer Author, Inside C# Author, Visual C++.NET Bible A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the af

                  N Offline
                  N Offline
                  Nick Parker
                  wrote on last edited by
                  #11

                  No problem Tom, let me ask you a question. Now that I see you have/are written/writing a book on Visual C++.NET, which language would you prefer to write an enterprise application in if asked to use the .NET Framework? Please don't say Fortran.NET or COBOL.NET :-D Nick Parker

                  T 1 Reply Last reply
                  0
                  • N Nick Parker

                    No problem Tom, let me ask you a question. Now that I see you have/are written/writing a book on Visual C++.NET, which language would you prefer to write an enterprise application in if asked to use the .NET Framework? Please don't say Fortran.NET or COBOL.NET :-D Nick Parker

                    T Offline
                    T Offline
                    Tom Archer
                    wrote on last edited by
                    #12

                    Actually, the VC++ book is an MFC book. However, I've done enough in Managed Extensions that I would seriously think about combining MFC and Managed Extensions. MFC for the UI simply because I've used it for 10 years and ME for the cool classes .NET has to offer. I'm not saying I would do that, but I'd give it some serious considerations under the right circumstances - especially if time was a major issue. Cheers, Tom Archer Author - Inside C#, Visual C++.NET Bible A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the af

                    1 Reply Last reply
                    0
                    • L Lost User

                      thx gicio

                      T Offline
                      T Offline
                      tomiga
                      wrote on last edited by
                      #13

                      As far as I know there is an appendinx in C# specification. (You can find it in your .NET installation folder in C#/C# langugae specification.doc :) Tomiga

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups