11

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?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131

1 Answers1

17

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

ccalboni
  • 12,120
  • 5
  • 30
  • 38
  • 5
    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 Mar 19 '10 at 07:54