Tab versus space indentation in C#
Posted
by Lars Fastrup
on Stack Overflow
See other posts from Stack Overflow
or by Lars Fastrup
Published on 2008-11-06T12:41:13Z
Indexed on
2010/06/08
11:12 UTC
Read the original article
Hit count: 264
I sometimes find myself discussing this issue with other C# developers and especially if we use different styles. I can see the advantage of tab indentation allowing different developers to browse the code with their favorite indent size. Nonetheless, I long ago went for two space indentation in my C# code and have stuck with it ever since. Mainly because I often disliked the way statements spanning multiple lines are sometimes messed up when viewing code from other developers using another tab size.
Recently a developer at one of my clients approached me and asked why I did not use tabs because he preferred to view code with an indentation size of 4.
So my question is: Which style do you prefer and why?
© Stack Overflow or respective owner