Deck 1 Flashcards
Which collection enforces type safety?
List
You define a method according to the following code segment.
01 void DoWork() 02 { 03 try 04 { 05 //Method body 06 } 07 catch (Exception) 08 { 09 } 10 finally 11 { 12 } 13 }
Where should you insert code that must be executed, regardless of whether or not an error is thrown?
Between lines 11 and 12
Which security policy level applies to all managed code on the computer?
Machine
You need to create an access rule that allows a user named UserA in MyDomain to read the contents of the Log.txt file. Which code segment should you use?
var fs = File.GetAccessControl("C:\\Logs\\Log.txt"); fs.AddAccessRule(new FileSystemAccessRule(@"MyDomain\UserA", FileSystemRights.ReadData, AccessControlType.Allow));
Custom event delegates are used to:
Route events to one or more event handlers.
What data is stored on the heap?
Objects that contain non-value data types
Which application domain host manages security for web applications?
Browser
You are creating an application using .NET Framework 4.0. You write the following code segment in the application.
class CompGenerate where T . IComparable { public T t1; public T t2; public CompGenerate(T _t1, T _t2) { t1 = _t1; t2 = _t2; } }
Given the above class declaration which of the following constructors is correct?
CompGenerate gen = new CompGenerate(10.125, 2005);
Which of the following terms are used in cryptography? Ea ch correct answer represents a complete solution. Choose all that apply.
Plaintext -----AND----- Cipher -----AND----- Key -----AND----- Ciphertext
Consider the following scenario. Allen has created a Windows Presentation Foundation (WPF) database application using .NET Framework 4.0. The application helps users keep track of their e-Book collection. He identifies that some computers might have many users, such as two roommates might shar e a computer, with both individuals using the same application on the same computer to manage their e-Book collections. Allen sets up a database to handle many users without mixing up the collections. Allen has implemented a very trendy system that allows users to alter the colors, fonts, and graphics in the application, giving it a personalized look and feel.
How will Allen’s WPF database application store the users’ color choices?
As a setting with user scope
Applications are overridden by explicit version policy in the configuration files. What are those configuration files? Each correct answer represents a complete solution. Choose all that apply.
Computer's administrator configuration file -----AND----- Application configuration file -----AND----- Publisher policy file
Which feature is available in both Microsoft Visual Basic .NET and C#?
Named and optional arguments in methods
You need to be able to install and uninstall an assembly from the Global Assembly Cache (GAC).
Which tool should you use?
Ngen.exe
When you delay sign a .NET assembly, the assembly will include:
Only the public key.
Common Intermediate Language (CIL) is converted into executable code by using:
Just-in-Time (JIT) compiler.