Program Control Flashcards
Which property of the DbException class identifies the data provider?
the Source property
Which method is used to stop a running thread for an
amount of time?
the Sleep method
Which delegate should you use when instantiating a
Thread object whose method takes no arguments?
the ThreadStart delegate
Which method is used to run a thread?
the Start method
Which delegate should you use when instantiating a
Thread object whose method takes argument(s)?
the ParameterizedThreadStart delegate
What is the syntax for instantiating a Thread object to
run a specified method?
Thread [name] = new Thread
([targetMethod]);
Which class allows you to easily manage multiple threads within an application domain?
the ThreadPool class
Which property of the IAsyncResult interface
indicates an asynchronous operation has ended?
the IsCompleted property
What is an exception?
An exception is an abnormal condition at runtime
resulting from an error or unexpected operation.
From which class should you inherit to implement a custom exception?
the Exception class
Which property of the Thread class is used to set or retrieve the current user for an application in rolebased security?
the CurrentPrincipal property
Which property of the ServiceSecurityAuditBehavior class sets whether logging failures will throw an exception?
the SuppressAuditFailure property
Which property of the DbException class provides the vendor-specific error message?
the Message property
What is the syntax used to declare a delegate?
public delegate [void|return] [name]
([args]);
What does the ThreadState enumeration indicate?
the current execution state of the thread, whether it
has been started, is running, or is suspended