IT認証試験問題集
毎月、ITshikenは1500人以上の受験者が試験準備を助けて、試験に合格するために受験者にご協力します
 ホームページ / 70-483 問題集  / 70-483 問題練習

Microsoft 70-483 問題練習

Programming in C# 試験

最新更新時間: 2021/01/16,合計521問。

2021新年のギフト:70-483 最新真題を買う時、日本語版と英語版両方を同時に獲得できます。

実際の問題集を練習し、試験のポイントを了解し、テストに申し込むするかどうかを決めることができます。

さらに試験準備時間の35%を節約するには、70-483 問題集を使用してください。

 / 35

Question No : 1
DRAG DROP
You are developing an application by using C#. The application will process several objects per second.
You need to create a performance counter to analyze the object processing.
Which three actions should you perform in sequence? (To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.)



正解:


Explanation:
Note:
: Example:
CounterCreationDataCollection counterDataCollection = new CounterCreationDataCollection(); // Box1

// Add the counter. Box 1
CounterCreationData averageCount64 = new CounterCreationData();
averageCount64.CounterType = PerformanceCounterType.AverageCount64;
averageCount64.CounterName = "AverageCounter64Sample";
counterDataCollection.Add(averageCount64);

// Add the base counter.
CounterCreationData averageCount64Base = new CounterCreationData();
averageCount64Base.CounterType = PerformanceCounterType.AverageBase;
averageCount64Base.CounterName = "AverageCounter64SampleBase";
counterDataCollection.Add(averageCount64Base); // Box 2

// Create the category. Box 3
PerformanceCounterCategory.Create("AverageCounter64SampleCategory",
"Demonstrates usage of the AverageCounter64 performance counter type.",
PerformanceCounterCategoryType.SingleInstance, counterDataCollection);

Question No : 2
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?

正解:

Question No : 3
You are developing an application by using C#.
The application includes an object that performs a long running process.
You need to ensure that the garbage collector does not release the object's resources until the process completes.
Which garbage collector method should you use?

正解:
Explanation:
The purpose of the KeepAlive method is to ensure the existence of a reference to an object that is at risk of being prematurely reclaimed by the garbage collector.
Reference: GC.KeepAlive Method (Object)
https://msdn.microsoft.com/en-us/library/system.gc.keepalive(v=vs.110).aspx

Question No : 4
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.)

正解:
Explanation:
Incorrect:
Not D: Cannot be used because of the internal keyword on line 03.

Question No : 5
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?



正解:
Explanation:
The condition new() ensures the empty/default constructor and must be the last condition.
When you define a generic class, you can apply restrictions to the kinds of types that client code can use for type arguments when it instantiates your class. If client code tries to instantiate your class by using a type that is not allowed by a constraint, the result is a compile-time error. These restrictions are called constraints.
Constraints are specified by using the where contextual keyword.
http://msdn.microsoft.com/en-us/library/d5x73970.aspx

Question No : 6
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?



正解:

Question No : 7
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?

正解:
Explanation:
The HMACSHA256 class computes a Hash-based Message Authentication Code (HMAC) by using the SHA256 hash function.
Reference: https://msdn.microsoft.com/en-us/library/system.security.cryptography.hmacsha256(v=vs.110).aspx

Question No : 8
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.)

正解:
Explanation:
* AssemblyDelaySignAttribute
Specifies that the assembly is not fully signed when created.
* The following code example shows the use of the AssemblyDelaySignAttribute attribute
with the AssemblyKeyFileAttribute.
using System;
using System.Reflection;
[assembly:AssemblyKeyFileAttribute(“TestPublicKey.snk”)]
[assembly:AssemblyDelaySignAttribute(true)]
namespace DelaySign
{
public class Test { }
}
Reference: http://msdn.microsoft.com/en-us/library/t07a3dye(v=vs.110).aspx

Question No : 9
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?

正解:
Explanation:
Task.ContinueWith - Creates a continuation that executes asynchronously when the target Task
completes.The returned Task will not be scheduled for execution until the current task has completed, whether it completes due to running to completion successfully, faulting due to an unhandled exception, or exiting out early due to being canceled.
http://msdn.microsoft.com/en-us/library/dd270696.aspx

Question No : 10
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?



正解:

Question No : 11
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.)



正解:


Explanation:
Incorrect:
Not Box 3: ReadToEndAsync() is not correct since only the first line of the response is required.

Question No : 12
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?



正解:

Question No : 13
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.)



正解:


Explanation:
Catch the most specific exception first.

Question No : 14
You are implementing a method named FloorTemperature 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?

正解:

Question No : 15
You are developing an application by using C#.
The application includes an object that performs a long running process.
You need to ensure that the garbage collector does not release the object's resources until the process completes.
Which garbage collector method should you use?

正解:
Explanation:
You can use the SuppressFinalize method in a resource class to prevent a redundant garbage collection from being called.
Reference: GC.SuppressFinalize Method (Object)
https://msdn.microsoft.com/en-us/library/system.gc.suppressfinalize(v=vs.110).aspx

 / 35