Deck 3 Flashcards
Which feature protects computers from running untrusted applications?
Code Access security
The SecureString class:
Protects data from being revealed during garbage collection.
Which two methods can you use to load an assembly? (Each correct answer presents a complete solution. Choose two.)
LoadModule(String, ByteQ)
—–AND—–
Load(String)
What is the purpose of strong naming?
To assign a globally unique key to the assembly.
Which standard allows data types to be interchanged among all Common Language Infrastructure (CLI) programming languages?
Common Type System (CTS)
You have created a program that writes status updates into a file. You want to modify the file. You need to ensure that other users can view the file while it is being modified. Which permission should you use to open the file?
FileShare.Read
Which two classes in the .NET Framework allow you to delete a file? (Each correct answer presents a complete solution. Choose two.)
System.IO.FileInfo
—–AND—–
System.IO.File
You want to substitute values in a string that is displayed on the console. Which code fragment will display “Hello, World”?
Console.WriteLine(“Hello, {0}”, “World”);
Where are the command line arguments stored for a console application?
In a string array parameter that is passed to the Main method.
You create a class that uses unmanaged resources. You need to ensure that users of the class can explicitly release resources when the instance of the class is no longer required. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
Use a class destructor that is called from within the Dispose method. -----AND----- Implement the IDisposable interface.
Value type variables are stored in the:
Stack
Managed code manages:
Processor optimization.
What does the .NET Framework use to pass data between managed and unmanaged code?
Marshaling
Which should you use to call a class written in C# from a program written in Microsoft Visual Basic .NET?
The Visual Basic .NET syntax
Type-safe code accesses only the memory locations:
It is authorized to access.