473,419 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

CLS compliant names

Does anyone know the correct naming conventions for CLS compliant code ?
The doc points to a really obscure and difficult to digest document on
the web about Unicode names, and I am looking for simpler rules that
tell me what names are CLS compliant. Here are some simple questions:

1) Can a CLS compliant name start with an underscore ?
2) Is there a limit to the length of a CLS complaint name ? With a full
namespace name ?
Nov 22 '05 #1
3 6910

"Edward Diener" <ed******@tropicsoft.com> wrote in message
news:OA**************@TK2MSFTNGP11.phx.gbl...
Does anyone know the correct naming conventions for CLS compliant code ?
The doc points to a really obscure and difficult to digest document on
the web about Unicode names, and I am looking for simpler rules that
tell me what names are CLS compliant. Here are some simple questions:
According to msdn,
CLS-compliant language compilers must follow the rules of Annex 7 of
Technical Report 15 of the Unicode Standard 3.0, which governs the set of
characters that can start and be included in identifiers. This standard is
available at http://www.unicode.org/unicode/repor...5/tr15-18.html.
For two identifiers to be considered distinct, they must differ by more than
just their case.

from Unicode Standard 3.0 Technical Report 15, Annex 7:

That is, the first character of an identifier can be an uppercase letter,
lowercase letter, titlecase letter, modifier letter, other letter, or letter
number. The subsequent characters of an identifier can be any of those, plus
non-spacing marks, spacing combining marks, decimal numbers, connector
punctuations, and formatting codes (such as right-left-mark). Normally the
formatting codes should be filtered out before storing or comparing
identifiers.
1) Can a CLS compliant name start with an underscore ? From my reading of the above quotes, no. 2) Is there a limit to the length of a CLS complaint name ? With a full
namespace name ? Let me dig into the ecma spec to see if anything exists, I can post back
about that later.

Nov 22 '05 #2
Daniel O'Connell wrote:
"Edward Diener" <ed******@tropicsoft.com> wrote in message
news:OA**************@TK2MSFTNGP11.phx.gbl...
Does anyone know the correct naming conventions for CLS compliant
code ? The doc points to a really obscure and difficult to digest
document on the web about Unicode names, and I am looking for
simpler rules that tell me what names are CLS compliant. Here are
some simple questions:
According to msdn,
CLS-compliant language compilers must follow the rules of Annex 7 of
Technical Report 15 of the Unicode Standard 3.0, which governs the
set of characters that can start and be included in identifiers. This
standard is available at
http://www.unicode.org/unicode/repor...5/tr15-18.html.


That's the doc which I refer to above as obscure and difficult to digest.
Making my way through it and trying to understand its terminology, was a
real PITA for me.
For two identifiers to be considered distinct, they must differ by
more than just their case.
I had known this from MSDN, thanks !

from Unicode Standard 3.0 Technical Report 15, Annex 7:

That is, the first character of an identifier can be an uppercase
letter, lowercase letter, titlecase letter, modifier letter, other
letter, or letter number. The subsequent characters of an identifier
can be any of those, plus non-spacing marks, spacing combining marks,
decimal numbers, connector punctuations, and formatting codes (such
as right-left-mark). Normally the formatting codes should be filtered
out before storing or comparing identifiers.
My problem reading the doc was trying to figure out what all those terms for
letters, marks, and codes actually meant. Some of them are obvious while
others require much understanding. I was lazy in trying to understand some
of the terminology, as it does seem to be unnecessarily abstruse or perhaps
poorly explained, so I asked here.
1) Can a CLS compliant name start with an underscore ?

From my reading of the above quotes, no.


I agree unless one of those 'letter' categories include an underscore, which
is doubtful.
2) Is there a limit to the length of a CLS complaint name ? With a
full namespace name ?

Let me dig into the ecma spec to see if anything exists, I can post
back about that later.


If you find it, that would be great. You have answered an important question
in my mind since someone had posted a .NET component on one of the .NET
websites which had a protected identifier starting with an underscore, and
this turned out to be not CLS compliant. I wasn't sure that was the reason,
but suspected it, and now I can answer that thread and explain why.
Appreciated !
Nov 22 '05 #3

"Edward Diener" <ed******@tropicsoft.com> wrote in message
news:Ok**************@TK2MSFTNGP12.phx.gbl...
Daniel O'Connell wrote:
"Edward Diener" <ed******@tropicsoft.com> wrote in message
news:OA**************@TK2MSFTNGP11.phx.gbl...
Does anyone know the correct naming conventions for CLS compliant
code ? The doc points to a really obscure and difficult to digest
document on the web about Unicode names, and I am looking for
simpler rules that tell me what names are CLS compliant. Here are
some simple questions:
According to msdn,
CLS-compliant language compilers must follow the rules of Annex 7 of
Technical Report 15 of the Unicode Standard 3.0, which governs the
set of characters that can start and be included in identifiers. This
standard is available at
http://www.unicode.org/unicode/repor...5/tr15-18.html.


That's the doc which I refer to above as obscure and difficult to digest.
Making my way through it and trying to understand its terminology, was a
real PITA for me.
For two identifiers to be considered distinct, they must differ by
more than just their case.


I had known this from MSDN, thanks !

from Unicode Standard 3.0 Technical Report 15, Annex 7:

That is, the first character of an identifier can be an uppercase
letter, lowercase letter, titlecase letter, modifier letter, other
letter, or letter number. The subsequent characters of an identifier
can be any of those, plus non-spacing marks, spacing combining marks,
decimal numbers, connector punctuations, and formatting codes (such
as right-left-mark). Normally the formatting codes should be filtered
out before storing or comparing identifiers.


My problem reading the doc was trying to figure out what all those terms

for letters, marks, and codes actually meant. Some of them are obvious while
others require much understanding. I was lazy in trying to understand some
of the terminology, as it does seem to be unnecessarily abstruse or perhaps poorly explained, so I asked here.

I suppose an underscore COULD be a modifer letter, but I doubt it and
wouldn't use it anyway.
There is also a rule in FxCop that mentinos not having members with
underscores.
1) Can a CLS compliant name start with an underscore ?

From my reading of the above quotes, no.


I agree unless one of those 'letter' categories include an underscore,

which is doubtful.
2) Is there a limit to the length of a CLS complaint name ? With a
full namespace name ? Let me dig into the ecma spec to see if anything exists, I can post
back about that later.


If you find it, that would be great. You have answered an important

question in my mind since someone had posted a .NET component on one of the .NET
websites which had a protected identifier starting with an underscore, and
this turned out to be not CLS compliant. I wasn't sure that was the reason, but suspected it, and now I can answer that thread and explain why.
Appreciated !

Nov 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Edward Diener | last post by:
Does anyone know the correct naming conventions for CLS compliant code ? The doc points to a really obscure and difficult to digest document on the web about Unicode names, and I am looking for...
70
by: Ben Pfaff | last post by:
One issue that comes up fairly often around here is the poor quality of the pseudo-random number generators supplied with many C implementations. As a result, we have to recommend things like...
192
by: Vortex Soft | last post by:
http://www.junglecreatures.com/ Try it and tell me what's happenning in the Microsoft Corporation. Notes: VB, C# are CLS compliant
1
by: Pieter | last post by:
Hi, I have this Warning for several forms when using the DockPanel Suite of Weifen Luo in VS.NET 2005. I read a lot about this CLS-compliant stuff, but I don't now how to chech actually which...
10
by: moondaddy | last post by:
I converted a vb.1.1 web service project to 2.0 and .net 2.0 created / replace some datasets. The code it automatiacly generated gets a warning message as follows: Warning 150 Name...
1
by: GB | last post by:
Hi, I just upgraded from VS2003 to VS2005 (VB.NET apps) an I get a number of warnings "Name "..." is not CLS_Compliant". All the corresponding "faulty" code is in DataSet1.Designer.vb, wich is...
3
by: John | last post by:
Hi After importing my vs 2003 project into vs 2005 I am getting the error Name '_DateColumn' is not CLS-compliant. on the second line of below code; ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.