Set - 6

Question 21 :

Describe the accessibility modifier "protected internal"?

Answer :

It is available to classes that are within the same assembly and derived from the specified base class.


Question 22 :

What's the top .NET class that everything is derived from?

Answer :

System.Object.

 


Question 23 :

What does the term immutable mean?

Answer :

The data value may not be changed. Note: The variable value may be changed, but the original immutable data value was discarded and a new data value was created in memory.


Question 24 :

What's the difference between System.String and System.Text.StringBuilder classes?

Answer :

System.String is immutable. System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.


Question 25 :

What's the advantage of using System.Text.StringBuilder over System.String?

Answer :

StringBuilder is more efficient in cases where there is a large amount of string manipulation. Strings are immutable, so each time a string is changed, a new instance in memory is created.