Home
C-Sharp
Interview FAQs

Show

FAQs of level

C# is a new language created by Microsoft and submitted to the ECMA for standardization. According Microsoft "C# is a modern, object-oriented language that enables programmers to quickly build a wide range of applications for the new Microsoft .Net platform, which provides tools and services that fully exploit both computing and communications."
C# is designed for both computing and communication is characterized by several key features. It is -

1. Simple
2. Consitent
3. Modern
4. Object-oriented
5. Type-safe
6. Versionable
7. Compatible
8. Interoprable and
9. Flexible

BOXING in C# is the conversion of a VALUE type on stack to a OBJECT type on the heap. Vice-versa the conversion from an OBJECT type back to a VALUE type is known as UNBOXING and it requires type casting.
There are two ways:

1. Using overloaded = operator like - string s2 = s1;
2. Using the static Copy method like - string s2 = string.Copy(s1);

There are three ways:

1. Overloaded Compare() method
2. Overloaded Equal() method
3. Overloaded == operator.

The default implementation of Equals supports reference equality only, but derived classes can override this method to support value equality.

Reference equality occurs when two reference type objects refer to the same object. Sometimes reference types need to define value equality instead of reference equality. Fortunately, the Equals method is virtual, so derived reference types may override it.

Anything under execution.
Displaying 1 of 25Next
Need Help? Contact Us.

Log in

*
*

Forgot password?

*

New User

*
*
*
*