Click to See Complete Forum and Search --> : predefined character and string constants?


rakkarage
October 17th, 2009, 08:57 AM
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

Mutant_Fruit
October 17th, 2009, 10:05 AM
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" ;)