GeekInterview.com
Series: Subject: Topic:
Question: 289 of 460

All .NET code have to be CLS compliant

Skill/Topic: Intermediate
A) True
B) False
Asked by: Interview Candidate | Asked on: Nov 27th, 2005
Showing Answers 1 - 7 of 7 Answers
samiksc

Answered On : Dec 7th, 2005

View all answers by samiksc

False: There is facility to add 'unmanaged' code in C# which need not be CLS compliant.

Yes  2 Users have rated as useful.
  
Login to rate this answer.
Vishal

Answered On : 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.

  
Login to rate this answer.
Suba

Answered On : 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."

Yes  2 Users have rated as useful.
  
Login to rate this answer.
SiwanNeeraj

Answered On : Nov 7th, 2008

View all answers by SiwanNeeraj

A. True

  
Login to rate this answer.
LordAlex

Answered On : Nov 6th, 2011

View all answers by LordAlex

The .NET Framework provides a run-time environment called the common language runtime.

  
Login to rate this answer.
Ravi Kumar

Answered On : 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.

Yes  1 User has rated as useful.
  
Login to rate this answer.
Sivavt

Answered On : Mar 26th, 2012

View all answers by Sivavt

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

  
Login to rate this answer.

Give your answer:

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

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Ads

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.