All .NET code have to be CLS compliant

Skill/Topic: Intermediate
A) True
B) False

Showing Answers 1 - 17 of 17 Answers

Vishal

  • Aug 6th, 2006
 

The answer is A). As far as i know, CLR control only the managed code. But .NET supports to do a communication with unmanaged code. But all the code that runs within .NET is managed code.Managed codes are CLS complient because they are written in either of the .NET complient language.Let me know if i am wrong on vishal.joshi1@gmail.com.Thanks,Vishal.

  Was this answer useful?  Yes

Suba

  • Feb 1st, 2007
 

this article in MSDN http://msdn2.microsoft.com/en-us/library/bhc3fa7f(VS.80).aspx says"You can mark assemblies, modules, types, and members as either CLS-compliant or not CLS compliant using the CLSCompliantAttribute."

Ravi Kumar

  • Dec 3rd, 2011
 

False

All .Net code need not be CLS compliant if you are going to write all modules using single .Net language. However, if you are going to use different .Net language for different modules then you have to mark the public functions as CLS-compliant otherwise you can use full feature of a .NET language( like C#, VB.NET) without being CLS compliant.

Sivavt

  • Mar 26th, 2012
 

Not required. If you want your code to be CLS complaint use the annotation CLScompliant(true)

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions