Microsoft 70-483 Programming in C# Online Training
Microsoft 70-483 Online Training
The questions for 70-483 were last updated at Nov 27,2024.
- Exam Code: 70-483
- Exam Name: Programming in C#
- Certification Provider: Microsoft
- Latest update: Nov 27,2024
DRAG DROP
You are developing an application that implements a set of custom exception types.
You declare the custom exception types by using the following code segments:
The application includes a function named DoWork that throws .NET Framework exceptions and custom exceptions.
The application contains only the following logging methods:
The application must meet the following requirements:
• When ContosoValidationException exceptions are caught, log the information by using the static void Log (ContosoValidationException ex) method.
• When ContosoDbException or other ContosoException exceptions are caught, log the information by using the static void Log(ContosoException ex) method.
You need to meet the requirements.
How should you complete the relevant code? (To answer, drag the appropriate code segments to the correct locations in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
You are developing an application that uses structured exception handling. The application includes a class named Logger.
The Logger class implements a method named Log by using the following code segment:
public static void Log(Exception ex) { }
You have the following requirements:
• Log all exceptions by using the Log() method of the Logger class.
• Rethrow the original exception, including the entire exception stack.
You need to meet the requirements.
Which code segment should you use?
- A . Option A
- B . Option B
- C . Option C
- D . Option D
DRAG DROP
You are developing an application that will include a method named GetData. The GetData() method will retrieve several lines of data from a web service by using a System.IO.StreamReader object.
You have the following requirements:
• The GetData() method must return a string value that contains the entire response from the web service.
• The application must remain responsive while the GetData() method runs.
You need to implement the GetData() method.
How should you complete the relevant code? (To answer, drag the appropriate objects to the correct locations in the answer area. Each object may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
You are developing an application that includes a class named BookTracker for tracking library books.
The application includes the following code segment. (Line numbers are included for reference only.)
You need to add a book to the BookTracker instance.
What should you do?
- A . Option A
- B . Option B
- C . Option C
- D . Option D
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?
- A . Create a task within the operation, and set the Task.StartOnError property to true.
- B . Create a TaskFactory object and call the ContinueWhenAll() method of the object.
- C . Create a task by calling the Task.ContinueWith() method.
- D . Use the TaskScheduler class to create a task and call the TryExecuteTask() method on the class.
You are developing an application by using C#. You provide a public key to the development team during development.
You need to specify that the assembly is not fully signed when it is built.
Which two assembly attributes should you include in the source code? (Each correct answer presents part of the solution. Choose two.)
- A . AssemblyFlagsAttribute
- B . AssemblyKeyFileAttribute
- C . AssemblyConfigurationAttribute
- D . AssemblyDelaySignAttribute
You are developing an application that will transmit large amounts of data between a client computer and a server. You need to ensure the validity of the data by using a cryptographic hashing algorithm.
Which algorithm should you use?
- A . RSA
- B . HMACSHA256
- C . Aes
- D . RNGCryptoServiceProvider
You are developing an application that uses the Microsoft ADO.NET Entity Framework to retrieve order information from a Microsoft SQL Server database.
The application includes the following code. (Line numbers are included for reference only.)
The application must meet the following requirements:
• Return only orders that have an OrderDate value other than null.
• Return only orders that were placed in the year specified in the year parameter.
You need to ensure that the application meets the requirements.
Which code segment should you insert at line 08?
- A . Option A
- B . Option B
- C . Option C
- D . Option D
You are creating an application that manages information about your company’s products. The application includes a class named Product and a method named Save.
The Save() method must be strongly typed. It must allow only types inherited from the Product class that use a constructor that accepts no parameters.
You need to implement the Save() method.
Which code segment should you use?
- A . Option A
- B . Option B
- C . Option C
- D . Option D
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 meet the following requirements:
• The value must be accessed only by code within the Employee class or within a class derived from the Employee class.
• The value must be modified only by code within 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.)
- A . Replace line 03 with the following code segment: public string EmployeeType
- B . Replace line 06 with the following code segment: protected set;
- C . Replace line 05 with the following code segment: private get;
- D . Replace line 05 with the following code segment: protected get;
- E . Replace line 03 with the following code segment: protected string EmployeeType
- F . Replace line 06 with the following code segment: private set;