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. Visual Studio Editor Question

Visual Studio Editor Question

Scheduled Pinned Locked Moved C#
csharptutorialvisual-studioquestion
13 Posts 8 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.
  • B Offline
    B Offline
    BobInNJ
    wrote on last edited by
    #1

    Have been doing some C# programming lately. I personally like white space inside my C# statements. For example, when I code a function call I will put a space after each and every argument. When I type that in using the Visual Studio Editor and hit return, I find that the blanks I have added go away. I do not like that. It seems to me that there should be a way to turn it off. I am hoping somebody in this group can tell me how to do that. Thanks Bob

    J P A 3 Replies Last reply
    0
    • B BobInNJ

      Have been doing some C# programming lately. I personally like white space inside my C# statements. For example, when I code a function call I will put a space after each and every argument. When I type that in using the Visual Studio Editor and hit return, I find that the blanks I have added go away. I do not like that. It seems to me that there should be a way to turn it off. I am hoping somebody in this group can tell me how to do that. Thanks Bob

      J Offline
      J Offline
      JOAT MON
      wrote on last edited by
      #2

      Tools | Options | Text Editor | C# | Formatting | Spacing

      Jack of all trades ~ Master of none.

      B A 2 Replies Last reply
      0
      • B BobInNJ

        Have been doing some C# programming lately. I personally like white space inside my C# statements. For example, when I code a function call I will put a space after each and every argument. When I type that in using the Visual Studio Editor and hit return, I find that the blanks I have added go away. I do not like that. It seems to me that there should be a way to turn it off. I am hoping somebody in this group can tell me how to do that. Thanks Bob

        P Offline
        P Offline
        PIEBALDconsult
        wrote on last edited by
        #3

        BobInNJ wrote:

        I will put a space after each and every argument

        Only after? Not before? Everything should be surrounded by whitespace.

        R 1 Reply Last reply
        0
        • P PIEBALDconsult

          BobInNJ wrote:

          I will put a space after each and every argument

          Only after? Not before? Everything should be surrounded by whitespace.

          R Offline
          R Offline
          R Giskard Reventlov
          wrote on last edited by
          #4

          No!!! No whitespace! Whitespace is akin to white noise. Well, I suppose it's a personal choice. :)

          "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me

          P 1 Reply Last reply
          0
          • J JOAT MON

            Tools | Options | Text Editor | C# | Formatting | Spacing

            Jack of all trades ~ Master of none.

            B Offline
            B Offline
            BobInNJ
            wrote on last edited by
            #5

            Thanks, you solved my problem. Bob

            1 Reply Last reply
            0
            • R R Giskard Reventlov

              No!!! No whitespace! Whitespace is akin to white noise. Well, I suppose it's a personal choice. :)

              "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me

              P Offline
              P Offline
              PIEBALDconsult
              wrote on last edited by
              #6

              But it's quiet white noise.

              1 Reply Last reply
              0
              • B BobInNJ

                Have been doing some C# programming lately. I personally like white space inside my C# statements. For example, when I code a function call I will put a space after each and every argument. When I type that in using the Visual Studio Editor and hit return, I find that the blanks I have added go away. I do not like that. It seems to me that there should be a way to turn it off. I am hoping somebody in this group can tell me how to do that. Thanks Bob

                A Offline
                A Offline
                Apocalypse Now
                wrote on last edited by
                #7

                Return Type should be string.

                D 1 Reply Last reply
                0
                • A Apocalypse Now

                  Return Type should be string.

                  D Offline
                  D Offline
                  Dave Kreskowiak
                  wrote on last edited by
                  #8

                  WHAT THE %#&*# ARE YOU TALKING ABOUT??

                  A guide to posting questions on CodeProject[^]
                  Dave Kreskowiak

                  A 1 Reply Last reply
                  0
                  • D Dave Kreskowiak

                    WHAT THE %#&*# ARE YOU TALKING ABOUT??

                    A guide to posting questions on CodeProject[^]
                    Dave Kreskowiak

                    A Offline
                    A Offline
                    Apocalypse Now
                    wrote on last edited by
                    #9

                    I think this is a problem of data type.

                    W D 3 Replies Last reply
                    0
                    • A Apocalypse Now

                      I think this is a problem of data type.

                      W Offline
                      W Offline
                      walterhevedeich
                      wrote on last edited by
                      #10

                      No its not. Nowhere in the post did OP mention about variables. OP is simply asking if there is a way to disable Visual Studio's automatically removing of the whitespaces that OP is putting on his methods (ex. void Method1( string arg1 ))

                      Signature construction in progress. Sorry for the inconvenience.

                      1 Reply Last reply
                      0
                      • A Apocalypse Now

                        I think this is a problem of data type.

                        D Offline
                        D Offline
                        Dave Kreskowiak
                        wrote on last edited by
                        #11

                        :omg: :wtf: Your solution doesn't have anything at all to do with the question that was asked. You are so far off topic that everyone who reads your answer will wonder if you intended to post your answer to an entirely different question.

                        A guide to posting questions on CodeProject[^]
                        Dave Kreskowiak

                        1 Reply Last reply
                        0
                        • J JOAT MON

                          Tools | Options | Text Editor | C# | Formatting | Spacing

                          Jack of all trades ~ Master of none.

                          A Offline
                          A Offline
                          Alan Balkany
                          wrote on last edited by
                          #12

                          Thanks. This has been bothering me for a long time!

                          "Microsoft -- Adding unnecessary complexity to your work since 1987!"

                          1 Reply Last reply
                          0
                          • A Apocalypse Now

                            I think this is a problem of data type.

                            D Offline
                            D Offline
                            Dave Kreskowiak
                            wrote on last edited by
                            #13

                            This is a direct email response to your message on the page "C#". This message has not appeared on the discussion board for that page. Message from Apocalypse Now ..........@qq.com: I think you haven't understanded this problem.You think How do his problem resolved? ________________________________________ Ummm, I think it's very much YOU who haven't understood the problem. The 1st reply (JOAT-MON) to the OP solves the problem as described.

                            A guide to posting questions on CodeProject[^]
                            Dave Kreskowiak

                            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