CLSCompliant

  • Thread starter Thread starter Tony Johansson
  • Start date Start date
T

Tony Johansson

Hi!

When a add this attribute
[CLSCompliant(true)]
just above the definition of class Team I get this kind of wanrning
Warning 1 'Lab1.Team' cannot be marked as CLS-compliant because the assembly
does not have a CLSCompliant attribute F:\C#\Lab1\Program.cs 73 5 Lab1

Why do I get this warning ?

//Tony
 
When a add this attribute
[CLSCompliant(true)]
just above the definition of class Team I get this kind of wanrning
Warning 1 'Lab1.Team' cannot be marked as CLS-compliant because the assembly
does not have a CLSCompliant attribute F:\C#\Lab1\Program.cs 73 5 Lab1

Why do I get this warning ?

The error text actually give the cause.

But if you need some more explanation, then there
are sources on the net. A quick googling found:
http://www.devarticles.com/c/a/C-Sharp/Making-Your-Code-CLS-Compliant/

Arne
 
Arne Vajhøj said:
When a add this attribute
[CLSCompliant(true)]
just above the definition of class Team I get this kind of wanrning
Warning 1 'Lab1.Team' cannot be marked as CLS-compliant because the
assembly
does not have a CLSCompliant attribute F:\C#\Lab1\Program.cs 73 5 Lab1

Why do I get this warning ?

The error text actually give the cause.

But if you need some more explanation, then there
are sources on the net. A quick googling found:
http://www.devarticles.com/c/a/C-Sharp/Making-Your-Code-CLS-Compliant/

Arne

Is it common to have to add attribute to the assembly as it is with
the attribute CLSCompliant.
Without adding this to the assembly I got this compile warning
Warning 1 'Lab1.Team' cannot be marked as CLS-compliant because the assembly
does not have a CLSCompliant attribute F:\C#\Lab1\Program.cs 73 5 Lab1

//Tony
 
Arne Vajhøj said:
When a add this attribute
[CLSCompliant(true)]
just above the definition of class Team I get this kind of wanrning
Warning 1 'Lab1.Team' cannot be marked as CLS-compliant because the
assembly
does not have a CLSCompliant attribute F:\C#\Lab1\Program.cs 73 5 Lab1

Why do I get this warning ?

The error text actually give the cause.

But if you need some more explanation, then there
are sources on the net. A quick googling found:
http://www.devarticles.com/c/a/C-Sharp/Making-Your-Code-CLS-Compliant/

Is it common to have to add attribute to the assembly as it is with
the attribute CLSCompliant.
Without adding this to the assembly I got this compile warning
Warning 1 'Lab1.Team' cannot be marked as CLS-compliant because the assembly
does not have a CLSCompliant attribute F:\C#\Lab1\Program.cs 73 5 Lab1

I don't consider it common.

But it may depend on what you are working on.

Arne
 
Back
Top