0

This is not a question about which is better 'tabs vs spaces'. However I am confused on which method I am actually using. In the default C# VS.NET 2010 IDE 'Tabs' settings it shows a tab size of 4 and the option of Insert spaces selected.

OK so in the almighty debate and to clear up what VS.NET is using, I press Tab on the keyboard but spaces are inserted. Does this mean I am using Tabs or Spaces? It's like I am using 'Tabs' masqueraded as spaces. Which is VS.NET and I using by default and which side of that would I be considered on when using the default options: tabs or spaces?

Please let me know so I can know definitively which method I am using. Thanks!

4

2 回答 2

2

至于 VS 使用什么,这取决于您是否选择了插入空格保留选项卡,如屏幕截图所示。选择插入空格后,您将被认为是争论的空格,因为空格会保存到实际文件中。

在此处输入图像描述

于 2012-07-25T17:51:51.230 回答
1

你会使用空格。当您点击制表符按钮时,Visual Studio 将输入 4 个空格字符而不是制表符字符。如果您在选项的选项卡部分选择了“保留选项卡”,则每次按下选项卡按钮都会输入一个选项卡字符。

于 2012-07-25T17:54:20.463 回答