473,388 Members | 1,220 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,388 software developers and data experts.

not CLS-compliant

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;

<System.Diagnostics.DebuggerNonUserCodeAttribute() _
Public ReadOnly Property _DateColumn() As System.Data.DataColumn
Get
Return Me.column_Date
End Get
End Property

What does that mean and how can I fix it? I suspect this code was generated
by vs 2003 itself.

Regards
Jan 15 '07 #1
3 4749
"John" <Jo**@nospam.infovis.co.ukwrote in message
news:OJ**************@TK2MSFTNGP04.phx.gbl...
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;

<System.Diagnostics.DebuggerNonUserCodeAttribute() _
Public ReadOnly Property _DateColumn() As System.Data.DataColumn
Get
Return Me.column_Date
End Get
End Property

What does that mean and how can I fix it? I suspect this code was
generated by vs 2003 itself.
I suspect it's the underscore.

Michael
Jan 15 '07 #2
"John" <Jo**@nospam.infovis.co.ukha scritto nel messaggio
<System.Diagnostics.DebuggerNonUserCodeAttribute() _
Public ReadOnly Property _DateColumn() As System.Data.DataColumn
Get
Return Me.column_Date
End Get
End Property

What does that mean and how can I fix it? I suspect this code was
generated by vs 2003 itself.
not CLS Compliant means that the *public* declaration doesn't follows the
CLR specifications.
This means that another .Net language may not understand correctly that
declaration if it uses your assembly as a reference.

In this case I think that the use of "_" as a name of a public member is a
bad practise.

--
www.neodatatype.net
Jan 15 '07 #3

"John" <Jo**@nospam.infovis.co.ukwrote in message
news:OJ**************@TK2MSFTNGP04.phx.gbl...
:
: 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;
:
: <System.Diagnostics.DebuggerNonUserCodeAttribute() _
: Public ReadOnly Property _DateColumn() As System.Data.DataColumn
: Get
: Return Me.column_Date
: End Get
: End Property
:
: What does that mean and how can I fix it? I suspect this code was
: generated by vs 2003 itself.
:
: Regards
It's the underscore.

http://msdn2.microsoft.com/en-us/library/k5645wwb.aspx

It's due the the fact that there are C/C++ compilers for .Net. In
these languages, names with leading underscore characters are reserved
for the "implementation" under certain specific rules (I've seen "the
implementation" defined as anything other than the code the programmer
is writing, btw). It states in the SDK documentation regarding
variable names in the C++ language:
Use of two sequential underscore characters ( __ ) at the
beginning of an identifier, or a single leading underscore
followed by a capital letter, is reserved for C++ implementations
in all scopes. You should avoid using one leading underscore
followed by a lowercase letter for names with file scope because
of possible conflicts with current or future reserved identifiers.
Since VB is not case sensitive, "_DateColumn" and "_dateColumn" are
identical. However, in C/C++/C# they are not. The first version of the
name is not legal in C++ but the second version is (although
discouraged). Since VB doesn't differentiate by case, neither version
is considered CLS compliant.
Ralf
--
--
----------------------------------------------------------
* ^~^ ^~^ *
* _ {~ ~} {~ ~} _ *
* /_``>*< >*<''_\ *
* (\--_)++) (++(_--/) *
----------------------------------------------------------
There are no advanced students in Aikido - there are only
competent beginners. There are no advanced techniques -
only the correct application of basic principles.
Jan 16 '07 #4

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

Similar topics

2
cls
by: Art McClure | last post by:
May I ask a dumb question? I am working with Python 2.3 IDLE. I want to completely clear the screen except for the ">>>", of course. What do I use? I have tried a number of suggestions, but they...
2
by: David MacQuigg | last post by:
I think there is a documentation error in both the Library Reference section 2.1 and the Python 2.2 Quick Reference page 19. The explanation for this function is: super( type) Returns the...
25
by: BOOGIEMAN | last post by:
I've just finished reading Python turtorial for non-programmers and I haven't found there anything about some usefull commands I used in QBasic. First of all, what's Python command equivalent to...
1
by: shefali | last post by:
Hi, I have an aspx page with a web form. I need to change the page that this form posts to depending on certain conditions. To do so, I have Javascript code on the page that looks like: ...
1
by: Oscar Thornell | last post by:
Hi! I have a strongly typed dataset based on a db (SQL Server)... One of the tables contains a column with name: ISO-3166-A2 and data type nchar(2)... The generated code (xsd.exe) in the...
0
by: manoj.sahu | last post by:
hi all, as per my study CLS is the common set of specification which should by meet by the language which want to target CLS(or .net). and CTS is the set of common types(or common data types)...
22
by: mp | last post by:
i have a python program which attempts to call 'cls' but fails: sh: line 1: cls: command not found i tried creating an alias from cls to clear in .profile, .cshrc, and /etc/profile, but none...
1
by: Smokey Grindle | last post by:
Is there a good explination of what would cause a CLS warrning in .NET 2.0 out there anywhere? like list of reasons and examples of what cause an object or type to not be CLS complaint? thanks!
3
by: james_027 | last post by:
hi, is cls & self the same thing? I have seen something like class A: def dosomething(cls): #doing something
9
AmberJain
by: AmberJain | last post by:
Hello, What is the difference between --------> 1. clrscr(); // defined in various header files 2. system("cls"); //available in stdio.h in bloodshed dev c++ Well,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.