Quiz
.NET
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (10)
1Which of the following are value types? (Choose 3)
- ADecimal
- BString
- CSystem.Drawing.Point
- DInteger
2Which is the correct declaration for a nullable integer?
- ANullable(int) i = null;
- BNullable<int> i = null;
- Cint i = null;
- Dint<Nullable> i = null;
3Which of the following are reference types? (Choose 2)
- ATypes declared Nullable
- BString
- CException
- DAll types derived from System.Object
4What is the correct order for catch clauses when handling different exception types?
- AMost general to most specific
- BMost likely to occur to least likely to occur
- CMost specific to most general
- DLeast likely to occur to most likely to occur
5The following scenarios, which would be a good reason to use the String- Builder class instead of the String class?
- AWhen building a string from shorter strings
- BWhen working with text data longer than 256 bytes
- CWhen you want to search and replace the contents of a string
- DWhen a string is a value type
6Why should you close and dispose of resources in a finally block instead of a catch block?
- AIt keeps you from having to repeat the operation in each catch.
- BA finally block runs whether or not an exception occurs.
- CThe compiler throws an error if resources are not disposed of in the finally block.
- DYou cannot dispose of resources in a catch block.
7You create an application with built-in exception handling. For some types of exceptions, you want to add an event to the Event Log that specifies the line of code that initiated the exception. Which Exception property should you use?
- AMessage
- BStackTrace
- CSource
- DData
8You pass a value-type variable into a procedure as an argument. The procedure changes the variable; however, when the procedure returns, the variable has not changed. What happened?
- AThe variable was not initialized before it was passed in.
- BPassing a value type into a procedure creates a copy of the data.
- CThe variable was redeclared within the procedure level.
- DThe procedure handled the variable as a reference.
9Which of the following statements are true? (Choose 2)
- AInheritance defines a contract between types.
- BInterfaces define a contract between types.
- CInheritance derives a type from a base type.
- DInterfaces derive a type from a base type.
10Which of the following are examples of built-in generic types? (Choose 2)
- ANullable
- BBoolean
- CEventHandler
- DSystem.Drawing.Point
Information
- Description
- Quiz on .NET, created by Aidos Baktaev on 15/05/2018.
- Author
- Aidos Baktaev
- Language
- English
- Views
- 98
- Rating
- No ratings yet Rate this quiz