C# Technical Questions / Answers

Started by china, May 03, 2008, 05:03 PM

Previous topic - Next topic

china

C# Technical Questions / Answers

1.) What is the access limit of internal keyword?

    Access inside the program or namespaces

2.) What is jagged array?

    Its array of arrays. Arrays inside an array element.

3.) How do you prevent the class from being inheritance?

    Simply include the keyword 'Sealed' in front of the class keyword.

4.) Tell C# syntax to catch any exception?

    The Answer of the question as follows.A catch block that catches the exception of type System.Exception. can also omit the parameter data type in this case and just write catch {}.


5.)What does the term immutable mean?

    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.

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

    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.

7.)What's the C# syntax to catch any possible exception?

    A catch block that catches the exception of type System.Exception. You can also omit the parameter data type in this case and just write catch {}.