CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2009
    Posts
    1

    predefined character and string constants?

    i think i remember seeing some string constants or enums for stuff like

    "\r\n", "\t", " "

    so you you don't have to use a bunch of strings like that you can just use

    string + Characters.Space

    or

    string + Strings.NewLine

    thanks

  2. #2
    Join Date
    May 2007
    Posts
    1,546

    Re: predefined character and string constants?

    Environment.NewLine - "\r\n" on windows, "\n" on linux and (new) macos
    Path.DirectorySeparatorChar

    As for the rest, it doesn't exist. It's so much easier to write: "mystring" + " " + "rest" than it is to write: "mystring" + Characters.Space + "rest"
    www.monotorrent.com For all your .NET bittorrent needs

    NOTE: My code snippets are just snippets. They demonstrate an idea which can be adapted by you to solve your problem. They are not 100% complete and fully functional solutions equipped with error handling.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured