Home All Groups Group Topic Archive Search About

Naming convention for objects

Author
10 Apr 2005 7:15 AM
kd
Hi All,

What is the naming convention for objects?

I checked the MSDN and found naming conventions for class members, etc; but
could not find information on the objects. It would be great if anybody could
provide me the link to the same.

Thanks.
kd

Author
10 Apr 2005 8:21 AM
Adam Goossens
kd,

It's totally up to preference. IMO you can name your objects (I assume
you mean classes?) whatever you like as long as it makes sense and you
are consistent throughout your application/library.

Regards,
-Adam.

kd wrote:
Show quoteHide quote
> Hi All,
>
> What is the naming convention for objects?
>
> I checked the MSDN and found naming conventions for class members, etc; but
> could not find information on the objects. It would be great if anybody could
> provide me the link to the same.
>
> Thanks.
> kd
Author
10 Apr 2005 9:12 AM
Bob Powell [MVP]
I would go along with Adam's statement but don't make the mistake of naming
a class that you use in hundreds of places with a huge camel-cased name. The
wear and tear on fingers and keyboards are too much.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





Show quoteHide quote
"kd" <k*@discussions.microsoft.com> wrote in message
news:D4E3D911-0ACF-47B5-831B-45747547E08B@microsoft.com...
> Hi All,
>
> What is the naming convention for objects?
>
> I checked the MSDN and found naming conventions for class members, etc;
> but
> could not find information on the objects. It would be great if anybody
> could
> provide me the link to the same.
>
> Thanks.
> kd
Author
10 Apr 2005 9:36 AM
Cor Ligthert
Bob,
>I would go along with Adam's statement but don't make the mistake of naming
>a class that you use in hundreds of places with a huge camel-cased name.
>The wear and tear on fingers and keyboards are too much.
>
True good written

:-)

Cor
Author
10 Apr 2005 11:24 AM
Herfried K. Wagner [MVP]
"kd" <k*@discussions.microsoft.com> schrieb:
> I checked the MSDN and found naming conventions for class members, etc;
> but
> could not find information on the objects. It would be great if anybody
> could
> provide me the link to the same.

Objects typically don't have names.  Are you referring to class names?

..NET Framework General Reference -- Naming Guidelines
<URL:http://msdn.microsoft.com/library/en-us/cpgenref/html/cpconnamingguidelines.asp>

Related:

Naming guidelines and code conventions
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=namingconventions&lang=en>

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>