Deck 5 Flashcards
An event is a/an:
Message sent by an object to signal the occurrence of an action.
You want to encrypt the connection string stored in the web.config file. Which tool should you use?
Web Site Administration Tool
Which namespace should you reference while using the StreamWriter class?
System.IO
You want to use a collection to store Order items. The collection must be thread-safe and must provide access to the items in a last-in-first-out sequence. Which type of collection should you use?
ConcurrentStack
You want to create a method that can accept any data type as arguments. Which feature of .NET languages allows you to create one method that will accept different data types on each call to the method?
Generics
A base class named MasterData is defined according to the following code segment.
public class MasterData { public virtual void LoadData() { Console.Write("Loading Data"); } }
Which code segment should you use to define a method named LoadData that overrides the
method in the MasterData class?
public class EmployeeData : MasterData { public override void LoadData() { Console.Write("Loading Employee Data..."); } }
A .NET application requires:
Common Language Runtime.
You create an unmanaged object and use the object. You no longer need the object. What should you do?
Dispose the object to release memory.
You need to force an immediate garbage collection of all unused memory. Which method should you use?
Collect
Where is dynamic memory allocated?
Heap
You need to configure security policy for the following policy levels:
- Machine
- User
- Enterprise
Which .NET tool should you use?
Code Access Security Policy
Which .NET tool should you use?
Code Access Security Policy
In the Common Language Runtime (CLR), what information is used to make decisions on security policy?
Evidence
Which named permission set allows common Language Runtime (CLR) to run code but disallows the use of protected resources from the computer?
Execution
Which two goals can you achieve by using cryptography? (Choose two.)
Prevent data from being modified.
—–AND—–
Ensure that data arrives at its destination.