Quite often I see source code where language's keyword are replaced with full type names:
System.String
, System.Int32
, System.GUID
etc.
Moreover, people who do this write complete type names everywhere, making source full of such declarations:
System.Collections.Generic.List<System.Reflection.PropertyInfo> list = System.Collections.Generic.List<System.Reflection.PropertyInfo>(newSystem.Reflection.PropertyInfo[] { ... });
When I ask them why do they do this, i get wide range of answers: "It helps me avoid type names collisions", "It looks more professional", "my VS plugin does it for me automatically" etc.
I understand, sometimes writing full type names helps you avoid writing unnecessary using
if you use the type one time throughout the source code file. And sometimes you need to declare a type explicitly, a great example is Threading Timer
and WinForms Timer
.
But if you source full of DB calls and you still write System.Data.SqlClient.SqlCommand
instead of 'SqlCommand' it looks quite a bit strange for me.
What do you think? Am i right or i just don't understand something?
Thank you!
P.S. And another phenomena is writing if (0 != variable
) instead of if (variable != 0)
.