tags:

views:

72

answers:

1

What identifier should I use for TAB (e.g. for output to text files)?

There are many choices:

  • vbTab
  • ControlChars.Tab
  • A constant (or public member) in my application set to Chr(9)

What is best practice? And why?

+9  A: 

Thumb up for ControlChars.Tab! vb* constants are there for backward compatibility, avoid them.

m.bagattini
Just because they’re there for backwards compatibility is no reason to avoid them. A better reason is that there are other alternatives that fit better with the style of the .NET framework, and that `vbTab` is of type `String` instead of type `Char`.
Konrad Rudolph