Deck 5 Flashcards

1
Q

An event is a/an:

A

Message sent by an object to signal the occurrence of an action.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

You want to encrypt the connection string stored in the web.config file. Which tool should you use?

A

Web Site Administration Tool

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which namespace should you reference while using the StreamWriter class?

A

System.IO

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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?

A

ConcurrentStack

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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?

A

Generics

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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?

A
public class EmployeeData : MasterData
{
   public override void LoadData()
   {
      Console.Write("Loading Employee Data...");
   }
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

A .NET application requires:

A

Common Language Runtime.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

You create an unmanaged object and use the object. You no longer need the object. What should you do?

A

Dispose the object to release memory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

You need to force an immediate garbage collection of all unused memory. Which method should you use?

A

Collect

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Where is dynamic memory allocated?

A

Heap

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

You need to configure security policy for the following policy levels:

  • Machine
  • User
  • Enterprise

Which .NET tool should you use?

A

Code Access Security Policy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which .NET tool should you use?

A

Code Access Security Policy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

In the Common Language Runtime (CLR), what information is used to make decisions on security policy?

A

Evidence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Which named permission set allows common Language Runtime (CLR) to run code but disallows the use of protected resources from the computer?

A

Execution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which two goals can you achieve by using cryptography? (Choose two.)

A

Prevent data from being modified.
—–AND—–
Ensure that data arrives at its destination.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which part of the .NET Framework verifies that code is type-safe?

A

Just-in-Time (JIT) compiler

17
Q

Which two tasks does the interoperability of the .NET language allow you to perform? (Choose two.)

A

Use classes written in C# from Microsoft Visual Basic .NET code.
—–AND—–
Use classes written in Microsoft Visual Basic .NET from C# code.

18
Q

Type-safe programming languages require that:

A

All data conversions are done implicitly.

19
Q

Which three characteristics define the identity of an assembly? (Each correct answer presents part of the solution. Choose three.)

A
Simple text name
-----AND-----
Culture information
-----AND-----
Version number
20
Q

.NET managed code compiles into:

A

Common Intermediate Language (CIL).