By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,314 Members | 1,775 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,314 IT Pros & Developers. It's quick & easy.

ControlChars

P: n/a
Hi all,

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

Thank you

Simon
Jul 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.