Search code examples
visual-studiovisual-studio-2019

Can there be a difference between Column number and Character number in Visual Studio 2019?


Visual Studio 2019 (and probably older versions) show you the Column number and Character number of the current position of your cursor. As you can see, these are showing the same number.

Image showing that the Column number and Character number are the same.

I was wondering if these can be different numbers, and if so what would cause them to be different (maybe there are characters that take up more or less than 1 space).


Solution

  • Yes - the values can be different. For example, when you have tab characters in your file (frequently used for indenting code). See below:

    enter image description here