| What is C# (C-Sharp)? |
| 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." |
|
|
|
|
|
| What are the characteristics of C#? |
| 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 |
|
|
|
|
|
| What is BOXING and UNBOXING in C#? |
| 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. |
|
|
|
|
|
| In how many ways you can create new copies of an existing string in C#? |
| There are two ways: 1. Using overloaded = operator like - string s2 = s1; 2. Using the static Copy method like - string s2 = string.Copy(s1); |
|
|
|
|
|
| In how many ways you can compare two strings in C# using overloaded methods and operators? |
| There are three ways: 1. Overloaded Compare() method 2. Overloaded Equal() method 3. Overloaded == operator. |
|
|
|
|
|