Is prefixing Windows Forms control names with their type OK?
Posted
by name
on Stack Overflow
See other posts from Stack Overflow
or by name
Published on 2010-06-10T15:51:07Z
Indexed on
2010/06/10
16:03 UTC
Read the original article
Hit count: 154
I have seen many responses that say that prefixing variables with their type is bad, since C# is statically typed and we have Intellisense, but I find that prefixing the names of the controls is useful because I don't need to remember the name of the controls or switch to the designer frequently.
For example:
btnLoad // Button
tbFilePath // TextBox
tvFileSystem // TreeView
Is this considered bad? If it is, what's the alternative?
© Stack Overflow or respective owner