Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class naming convention
Message
De
12/09/2007 09:27:48
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
 
 
À
12/09/2007 08:53:53
Alan Harris-Reid
Baseline Data Services
Devon, Royaume Uni
Information générale
Forum:
ASP.NET
Catégorie:
Conception classe
Divers
Thread ID:
01253829
Message ID:
01253900
Vues:
28
>Hello Viv, thanks for the reply.
>
>>In practice the MS suggestions are probably no better than other schemes but at least these are the conventions followed by the framework classes themselves and by most MS code examples.....
>
>While I have seen many examples of class naming, there are surprisingly few regarding subclassing the base controls (apart from with the 'My' prefix). I guess I'll have to roll-my-own naming which sticks as close as possible to the MSFT standards.
>
>Regards,
>Alan

I don't know how much of this applies...

I have one project called .Common that contains all of my universal classes and base controls.

Since Windows controls are in the Systems.Windows.Forms namespace (for example, System.Windows.Forms.Button), I put my base classes in .Common.Windows.Forms namespace, and named the class Button.

I use the My prefix when I am instantiating an object in a method, for example:
Dim myCustomerDataSet As New CustomerDataSet
When I instantiate an object on the form level, I try to stick to my class variable naming standards, like so:
Private m_CustomerDataSet AS CustomerDataSet
I know Microsoft documentation doesn't encourage the m_ prefix, but that is what I do.\
Very fitting: http://xkcd.com/386/
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform