What is CTS, CLS and CLR ?

Answer Posted / dinesh parmar

What is the CTS?
A set of common types
any language that runs in CLR should implement
no syntax specified
Languages often define aliases
For example
CTS defines System.Int32 – 4 byte integer
C# defines int as an alias of System.Int32
string -> System.String
object -> System.Object

What is the CLS?
A specification of language features
how methods may be called
when constructors are called
subset of the types in CTS are allowed
E.g. UInt32 is in CTS, but not in CLS
Non-CLS-compliant example
Code that takes UInt32 in a public method
Can mark classes as CLS-compliant
not marked is assumed to mean not compliant.

Is This Answer Correct ?    31 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what are delegates?

578


What is data cache in sql server?

591


What is the web.config file in asp?

636


Why web api is better than wcf?

555


Is asp.net mvc still used? : Asp.Net MVC

510






How do you do client-side validation in .net? How to disable validator control by client side javascript?

533


What are the server controls in asp.net?

457


Why do we use asp.net?

585


What are tuples?

541


How will you load dynamic assembly?

538


How do you implement sql caching in asp.net?

565


What are the main advantages of using asp.net?

555


Can you clarified A Web service can only be written in .NET or not?

539


What is recordset asp?

542


How do you declare static variable?

561