Re: vb.net coding standards
From: Mark Broadbent (no-spam-please_at_no-spam-please.com)
Date: 05/13/04
- Next message: Jon Skeet [C# MVP]: "Re: vb.net coding standards"
- Previous message: Tian Min Huang: "Re: version 1.0 and Version 1.1 issues"
- In reply to: Jon Skeet [C# MVP]: "Re: vb.net coding standards"
- Next in thread: Jon Skeet [C# MVP]: "Re: vb.net coding standards"
- Reply: Jon Skeet [C# MVP]: "Re: vb.net coding standards"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 13 May 2004 10:35:05 +0100
If I am reading your post correctly, you would use the Control suffix for
something like a panel and Input for something like radio button?
I quite like the idea of separation from the operational variables on a
form. It's certainly something I'm going to think about.
I'm not sure if I'd like Input and Control used alongside each other on
different form controls though (would rather just Control used throughout).
Otherwise I think it might end up being self defeating due to the
potentially changing nature of a controls function on a form.
An Example that springs to mind could be some kind of PictureBox control
that originally in an application is only used to display a static never
changing picture (therefore we would call Control) and in version 2 of the
app, this control allows changes to be made to the picture (therefore there
could be an argument to postfix Input instead).
Thanks for idea.
-- -- Br, Mark Broadbent mcdba , mcse+i ============= "Jon Skeet [C# MVP]" <skeet@pobox.com> wrote in message news:MPG.1b0d44732f4f843e98a8c4@msnews.microsoft.com... > Mark Broadbent <no-spam-please@no-spam-please.com> wrote: > > Tian's link is one which I have found helpful in the past. One thing I have > > stopped doing though is using the underscore Camel for privates and > > Hungarian for controls. > > > > e.g. > > > > article suggests > > > > _sizeOfWallet (for private) > > txtTextBox1 > > > > I use > > sizeOfWallet (since the camel case is enough to distinguish its' private > > use) > > textBox1 (since you spend more time with Hungarian looking up the prefixes, > > although prefixes are useful in designer to find controls quickly. One > > professional pointed out to me that with Hungarian you do tend to hit grey > > areas especially with custom controls and this is definately something I > > have experienced in the past). > > For controls, I've recently started using just "Input" or "Control" to > signify that it's a control for the data rather than the data itself. > That way, I can change from (say) a combo box to a text field without > either changing all my variables or letting them get "out of date". So, > I would have something like: > > TextBox userInput; > TextBox passwordInput; > CheckBox rememberPasswordInput; > > -- > Jon Skeet - <skeet@pobox.com> > http://www.pobox.com/~skeet > If replying to the group, please do not mail me too
- Next message: Jon Skeet [C# MVP]: "Re: vb.net coding standards"
- Previous message: Tian Min Huang: "Re: version 1.0 and Version 1.1 issues"
- In reply to: Jon Skeet [C# MVP]: "Re: vb.net coding standards"
- Next in thread: Jon Skeet [C# MVP]: "Re: vb.net coding standards"
- Reply: Jon Skeet [C# MVP]: "Re: vb.net coding standards"
- Messages sorted by: [ date ] [ thread ]