ControlChars

  • Thread starter Thread starter Simon
  • Start date Start date
S

Simon

Hi all,

Does anyone know what is equivalent to ControlChars class
in C#?

Thank you

Simon
 
Simon,
Does anyone know what is equivalent to ControlChars class
in C#?

There's no equivalent, C# doesn't have "built in" classes the same way
VB.NET does. You can, however, reference Microsoft.VisualBasic.dll
from C# and use the ControlChars class that way if you really want.

But in C# you usually use character escape sequences instead. For
example "Foo" & ControlChars.Tab & "Bar" in VB.NET can be written as
"Foo\tBar" in C#.

ControlChars.Tab -> \t
ControlChars.Cr -> \r
ControlChars.Lf -> \n

and so on.



Mattias
 
Back
Top