It is more faster and easier to pass the Microsoft 70-483 exam by using Download Microsoft Programming in C# questuins and answers. Immediate access to the Most up-to-date 70-483 Exam and find the same core area 70-483 questions with professionally verified answers, then PASS your exam with a high score now.
Q141. - (Topic 2)
You are developing a class named Account that will be used by several applications. The applications that will consume the Account class will make asynchronous calls to the Account class to execute several different methods.
You need to ensure that only one call to the methods is executed at a time.
Which keyword should you use?
A. sealed
B. protected
C. checked
D. lock
Answer: D
Q142. DRAG DROP - (Topic 2)
You are adding a method to an existing application. The method uses an integer named statusCode as an input parameter and returns the status code as a string.
The method must meet the following requirements:
Return "Error" if the statusCode is 0.
Return "Success" if the statusCode is 1.
Return "Unauthorized" if the statusCode is any value other than 0 or l.
You need to implement the method to meet the requirements.
How should you complete the relevant code? (To answer, drag the appropriate statements to the correct locations in the answer area. Each statement 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.)
Answer:
Q143. HOTSPOT - (Topic 2)
You have the following code:
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
Answer:
Q144. - (Topic 2)
You are developing an application that includes methods named ConvertAmount and TransferFunds.
You need to ensure that the precision and range of the value in the amount variable is not lost when the TransferFunds() method is called.
Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C
Explanation: Simply use float for the TransferFunds parameter.
Note:
* The float keyword signifies a simple type that stores 32-bit floating-point values.
* The double keyword signifies a simple type that stores 64-bit floating-point values
Q145. - (Topic 2)
You write the following method (line numbers are included for reference only):
You need to ensure that the method extracts a list of URLs that match the following pattern: @http://(www\.)?([^\.]+)\.com;
Which code should you insert at line 07?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A
Explanation: The MatchCollection.GetEnumerator method returns an enumerator that
iterates through a collection.
Note:
The MatchCollection Class represents the set of successful matches found by iteratively
applying a regular expression pattern to the input string.
Reference: MatchCollection.GetEnumerator Method
https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.matchcollection.getenumerator(v=vs.110).aspx
Q146. - (Topic 1)
You are developing an assembly that will be used by multiple applications.
You need to install the assembly in the Global Assembly Cache (GAC).
Which two actions can you perform to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
A. Use the Assembly Registration tool (regasm.exe) to register the assembly and to copy the assembly to the GAC.
B. Use the Strong Name tool (sn.exe) to copy the assembly into the GAC.
C. Use Microsoft Register Server (regsvr32.exe) to add the assembly to the GAC.
D. Use the Global Assembly Cache tool (gacutil.exe) to add the assembly to the GAC.
E. Use Windows Installer 2.0 to add the assembly to the GAC.
Answer: D,E
Explanation:
There are two ways to deploy an assembly into the global assembly cache:
Use an installer designed to work with the global assembly cache. This is the preferred option for installing assemblies into the global assembly cache.
Use a developer tool called the Global Assembly Cache tool (Gacutil.exe), provided by the
Windows
Software Development Kit (SDK).
Note:
In deployment scenarios, use Windows Installer 2.0 to install assemblies into the global assembly cache. Use the Global Assembly Cache tool only in development scenarios, because it does not provide assembly reference counting and other features provided when using the Windows Installer.
http://msdn.microsoft.com/en-us/library/yf1d93sz%28v=vs.110%29.aspx
Q147. - (Topic 2)
You are creating an application that processes a list of numbers.
The application must define a method that queries the list and displays a subset of the
numbers to the user. The method must not update the list.
You need to create an extendable query by using LINQ.
What should you do?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C
Q148. - (Topic 2)
You are implementing a method named ProcessReports that performs a long-running task. The ProcessReports() method has the following method signature:
public void ProcessReports(List<decimal> values,CancellationTokenSource cts, CancellationToken ct)
If the calling code requests cancellation, the method must perform the following actions:
. Cancel the long-running task.
. Set the task status to TaskStatus.Canceled.
You need to ensure that the ProcessReports() method performs the required actions.
Which code segment should you use in the method body?
A. if (ct.IsCancellationRequested) return;
B. ct.ThrowIfCancellationRequested() ;
C. cts.Cancel();
D. throw new AggregateException();
Answer: B
Q149. - (Topic 1)
You are developing an application that includes the following code segment. (Line numbers are included for reference only.)
The GetCustomers() method must meet the following requirements:
Connect to a Microsoft SQL Server database.
Populate Customer objects with data from the database.
Return an IEnumerable<Customer> collection that contains the populated
Customer objects.
You need to meet the requirements.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A. Insert the following code segment at line 17: while (sqlDataReader.GetValues())
B. Insert the following code segment at line 14: sqlConnection.Open();
C. Insert the following code segment at line 14: sqlConnection.BeginTransaction();
D. Insert the following code segment at line 17: while (sqlDataReader.Read())
E. Insert the following code segment at line 17: while (sqlDataReader.NextResult())
Answer: B,D
Explanation:
SqlConnection.Open - Opens a database connection with the property settings specified by the ConnectionString.
http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.open.aspx SqlDataReader.Read - Advances the SqlDataReader to the next record. http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.read.aspx
Q150. - (Topic 2)
You are modifying an application that processes loans. The following code defines the Loan class. (Line numbers are included for reference only.)
Loans are restricted to a maximum term of 10 years. The application must send a notification message if a loan request exceeds 10 years.
You need to implement the notification mechanism.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A. Option A
B. Option B
C. Option C
D. Option D
Answer: B,D