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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

vb .net 1
C# coding error 1
Working with Forms in MC++ 1
Module 1
IComparable 2
property in C# 4
LSP to C# 0
please me Help with this program 2

Back
Top