Microsoft 70-483 Exam Practice Questions (P. 4)
- Full Access (271 questions)
- Six months of Premium Access
- Access to one million comments
- Seamless ChatGPT Integration
- Ability to download PDF files
- Anki Flashcard files for revision
- No Captcha & No AdSense
- Advanced Exam Configuration
Question #16
You are creating a class named Employee. The class exposes a string property named EmployeeType. The following code segment defines the Employee class.
(Line numbers are included for reference only.)

The EmployeeType property value must be accessed and modified only by code within the Employee class or within a class derived from the Employee class.
You need to ensure that the implementation of the EmployeeType property meets the requirements.
Which two actions should you perform? (Each correct answer represents part of the complete solution. Choose two.)
(Line numbers are included for reference only.)

The EmployeeType property value must be accessed and modified only by code within the Employee class or within a class derived from the Employee class.
You need to ensure that the implementation of the EmployeeType property meets the requirements.
Which two actions should you perform? (Each correct answer represents part of the complete solution. Choose two.)
- AReplace line 05 with the following code segment:protected get;
- BReplace line 06 with the following code segment:private set;
- CReplace line 03 with the following code segment:public string EmployeeType
- DReplace line 05 with the following code segment:private get;
- EReplace line 03 with the following code segment:protected string EmployeeType
- FReplace line 06 with the following code segment:protected set;
Correct Answer:
BE
BE
send
light_mode
delete
Question #17
You are implementing a method named Calculate that performs conversions between value types and reference types. The following code segment implements the method. (Line numbers are included for reference only.)

You need to ensure that the application does not throw exceptions on invalid conversions.
Which code segment should you insert at line 04?

You need to ensure that the application does not throw exceptions on invalid conversions.
Which code segment should you insert at line 04?
- Aint balance = (int) (float)amountRef;
- Bint balance = (int)amountRef;
- Cint balance = amountRef;
- Dint balance = (int) (double) amountRef;
Correct Answer:
A
A
send
light_mode
delete
Question #18
You are creating a console application by using C#.
You need to access the application assembly.
Which code segment should you use?
You need to access the application assembly.
Which code segment should you use?
- AAssembly.GetAssembly(this);
- Bthis.GetType();
- CAssembly.Load();
- DAssembly.GetExecutingAssembly();
Correct Answer:
D
✑ Assembly.GetExecutingAssembly - Gets the assembly that contains the code that is currently executing.
✑ Assembly.GetAssembly - Gets the currently loaded assembly in which the specified class is defined.
References:
http://msdn.microsoft.com/en-us/library/system.reflection.assembly.getassembly.aspx http://msdn.microsoft.com/en-us/library/system.reflection.assembly.getexecutingassembly(v=vs.110).aspx
D
✑ Assembly.GetExecutingAssembly - Gets the assembly that contains the code that is currently executing.
✑ Assembly.GetAssembly - Gets the currently loaded assembly in which the specified class is defined.
References:
http://msdn.microsoft.com/en-us/library/system.reflection.assembly.getassembly.aspx http://msdn.microsoft.com/en-us/library/system.reflection.assembly.getexecutingassembly(v=vs.110).aspx
send
light_mode
delete
Question #19
HOTSPOT -
You are implementing a library method that accepts a character parameter and returns a string.
If the lookup succeeds, the method must return the corresponding string value. If the lookup fails, the method must return the value "invalid choice."
You need to implement the lookup algorithm.
How should you complete the relevant code? (To answer, select the correct keyword in each drop-down list in the answer area.)
Hot Area:

You are implementing a library method that accepts a character parameter and returns a string.
If the lookup succeeds, the method must return the corresponding string value. If the lookup fails, the method must return the value "invalid choice."
You need to implement the lookup algorithm.
How should you complete the relevant code? (To answer, select the correct keyword in each drop-down list in the answer area.)
Hot Area:

Correct Answer:
References: http://msdn.microsoft.com/en-us/library/06tc147t(v=vs.110).aspx

References: http://msdn.microsoft.com/en-us/library/06tc147t(v=vs.110).aspx
send
light_mode
delete
Question #20
You use the Task.Run() method to launch a long-running data processing operation. The data processing operation often fails in times of heavy network congestion.
If the data processing operation fails, a second operation must clean up any results of the first operation.
You need to ensure that the second operation is invoked only if the data processing operation throws an unhandled exception.
What should you do?
If the data processing operation fails, a second operation must clean up any results of the first operation.
You need to ensure that the second operation is invoked only if the data processing operation throws an unhandled exception.
What should you do?
- ACreate a TaskCompletionSource<T> object and call the TrySetException() method of the object.
- BCreate a task by calling the Task.ContinueWith() method.
- CExamine the Task.Status property immediately after the call to the Task.Run() method.
- DCreate a task inside the existing Task.Run() method by using the AttachedToParent option.
Correct Answer:
B
B
send
light_mode
delete
All Pages