PCS Test

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 7

1

Indexers are ____ members that allow you to access data within objects.

class data index property

An ____________ method is created when you instantiate or refer a delegate with a block of _________ code.

anonymous, named named, anonymous anonymous, unnamed unnamed, anonymous

Which of the following statements about generics are correct?

Generics are data structures that guard against reuse of defined C# data type functionalities. Generics allow you to reuse the code in a safe manner without casting or boxing Generics are parameterized data structures that can work with reference types only. Generics always accept a type parameter, which is a placeholder for the required data type.

The _________ method of the ArrayList class copies the elements of a list to an array while the _______ method also copies elements of a list to an array of type Object.

Contains, TrimToSize CopyTo, ToArray TrimToSize, Contains ToArray. TrimToSize

The SortedList class behaves like an __________ if you access its elements based on their index number otherwise it behaves like a __________.

array, hash table hash table, heap heap, queue queue, array

Can you re-arrange the steps given below to implement delegates in C#?
A. Declare a delegate. B. Call method using the delegate object. C. Create method to be referred by delegate. D. Instantiate the delegate.

A, B, C, D A, C, D, B A, D, C, B A, B, D, C

The ___________________________ exception is thrown when the stack runs out of space while the ________________________ exception is thrown when the result of an arithmetic, casting or conversion operation is larger in size than the destination object or variable.

OverflowException, OutOfMemoryException OutOfMemoryException, NullReferenceException NullReferenceException, StackOverflowException StackOverflowException, OverflowException

Which of the following statements about Visual Studio 2005 IDE key elements are correct?

The Code Editor facilitates writing, display and editing of form, event, and method code. The Dynamic Help window provides a list of topics depending on the active IDE area or task. The Properties window displays compile-time properties and events of objects at all times. The Solution Explorer provides an organized view of projects and access to their commands.

Managing memory and verifying code safety are functionalities of _____________.

Common Language Runtime .NET Framework Class Library Common Language Specification Common Type System

10

The Visual Studio 2005 ___________ edition is a proper choice for students, enthusiasts and hobbyists.

Team System Professional

Standard Express

11

Which one of the following statement about C# variables is incorrect?

A variable is a computer memory location identified by a unique name. A variable's name is used to access and read the value stored in it. A variable is allocated or deallocated in memory during runtime. A variable can be initialized at the time of its creation or later.

12

An _________ method is an inline nameless block of code that can be passed as a delegate parameter.

anonymous named partial unnamed

13

Using the ________ method, it is possible to programmatically force a garbage collection

GC.Collect() GC.Remove() GC.Delete()

14

_________ is a characteristic of an entity that supports a new class from an existing class.

Inheritance Polymorphism Encapsulation

15

_________ can be invoked either by creating an instance of the base class or using the base keyword.

Base class objects Base class methods Base class constructors

16

The _________ operator returns null if the two types or classes are incompatible with each other.

Is As to

17

Properties cannot be ___________.

Static Derived Overloaded

18

The ________ feature of C# resolves ambiguous name references.

Data binding Interface

Namespace alias qualifier

19

The _______ displays information about classes in .Net framework.

Windows class viewer tool WinCV tool window Windows tool class

20

The _________ public method of the System.Exception class returns a string representation of the thrown exception.

getString ToString setString

21

The _____protected method of the System.Exception class allows objects to perform cleanup operations before they are reclaimed by the garbage collector.

MemberwiseClone Finalize GetObjectData

22

The __________ public property of the System.Exception class retrieves the reference of the object of type exception that caused the thrown exception.

InnerException GetObjectData

GetBaseException

23

The ______ namespace is imported by default in the .NET Framework and it appears as the first line of the program.

Collections Data Web System

24

A custom namespace is declared using the _________ keyword and is accessed with the ________ keyword similar to any built-in namespace.

interface, system interface, using namespace, system namespace, using

25

___________ naming refers to access a class defined within a namespace by its name only.

Fully qualified Partially qualified Unqualified Qualified

You might also like