Jump to content

Recommended Posts

Posted

I'm using Wintellect's Power Collections for .NET

 

http://powercollections.codeplex.com/releases/view/6863

 

and am getting warning messages like:

 

Argument type 'Leadwerks.Vector3' is not CLS compliant

 

whenever I declare a Leadwerks type.

 

I found the cause is this line in Wintellect's algorithms file:

 

// Everything should be CLS compliant.
[assembly: CLSCompliant(true)]

 

Does anyone know what the problem is? Is it an issue with Leadwerks itself, or is it the C# wrapper?

Win 7 Pro 64 bit

AMD Phenom II X3 720 2.8GHz

GeForce 9800 GTX/9800 GTX+

4 GB RAM

Posted

From what I have read, you can mark parts of the code to be non compliant. I don't know if it can still be used with these collections though.

 

http://www.devarticles.com/c/a/C-Sharp/Making-Your-Code-CLS-Compliant/

 

 

You can apply the CLSCompliant attribute on an assembly (or a program element) and have the compiler check if your code is CLS (Common Language System) compliant. This means it works properly when consumed by other .NET languages. For example, you can place the following attribute on your .NET AssemblyInfo.cs files:

 

[assembly: CLSCompliant(true)]

 

 

Some of the things the compiler checks:

 

Class and member names cannot differ only by case. For example, you can't have one property named Counter and another named counter. This is important for cross-language compatibility since VB .NET isn't case sensitive.

 

Overloaded class methods cannot differ only by out or ref parameter designations.

 

Publicly exposed members cannot start with an underscore ( _ ).

 

Operators can't be overloaded

 

Unsigned types can't be part of the public interface of a class

 

Unfortunately, although you can apply the CLSCompliant attribute in VB .NET, the VB .NET compiler doesn't check for CLS compliance. In VB.NET 2005, this has apparently been fixed.

Win 7 Pro 64 bit

AMD Phenom II X3 720 2.8GHz

GeForce 9800 GTX/9800 GTX+

4 GB RAM

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...