What is CTS ?

October 28, 2007 · Filed Under .Net Framework Interview Questions, Placement Questions 



Don't want to miss a single bit? Subscribe By Email for Daily Jobs

Enter your email address :

All the latest from JobsAdda on Jobsadda.com delivered to your mailbox everyday.

CTS is an acronym for Common Type System which is an integral part of .net and which ensures language compatibility, interoperability and integration. Because .net treats all languages equal a class written in C# should be equivalent to class written in VB.net. Languages must agree on the meaning of these concepts before they can integrate with one another. To make this integration possible Microsoft has specified a common type system which every .net language must follow.

There are two types in CTS: value type and reference type. Value types reference values on the stack. When a value type is passed to a function they are passed by value i.e. original value of the passed variable will not change.

If a type consumes memory then it should be declared as a reference type. They contain references to heap based objects and are reclaimed by the garbage collector. When you pass a variable by reference then if the called function modifies it, it is visible in the calling function because it works on the actual object contrast to value type where a copy of the object is passed.

Related Articles


Get Latest JobsAdda.com Jobs, news & updates  via Email