aiotestking uk

70-483 Exam Questions - Online Test


70-483 Premium VCE File

Learn More 100% Pass Guarantee - Dumps Verified - Instant Download
150 Lectures, 20 Hours

Q1. - (Topic 2) 

You need to write a method that retrieves data from a Microsoft Access 2013 database. 

The method must meet the following requirements: 

Be read-only. 

Be able to use the data before the entire data set is retrieved. 

Minimize the amount of system overhead and the amount of memory usage. 

Which type of object should you use in the method? 

A. SqlDataAdapter 

B. DataContext 

C. DbDataAdapter 

D. OleDbDataReader 

Answer:

Explanation: OleDbDataReader Class 

Provides a way of reading a forward-only stream of data rows from a data source. 

Example: 

OleDbConnection cn = new OleDbConnection(); 

OleDbCommand cmd = new OleDbCommand(); 

DataTable schemaTable; 

OleDbDataReader myReader; 

//Open a connection to the SQL Server Northwind database. 

cn.ConnectionString = "Provider=SQLOLEDB;Data Source=server;User ID=login; 

Password=password;Initial Catalog=Northwind"; 

Q2. DRAG DROP - (Topic 1) 

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.) 

Answer:  

Q3. - (Topic 2) 

An application uses X509 certificates for data encryption and decryption. The application stores certificates in the Personal certificates collection of the Current User store. On each computer, each certificate subject is unique. 

The application includes a method named LoadCertificate. The LoadCertificate() method includes the following code. (Line numbers are included for reference only.) 

The LoadCertificate() method must load only certificates for which the subject exactly matches the searchValue parameter value. 

You need to ensure that the LoadCertificate() method loads the correct certificates. 

Which code segment should you insert at line 06? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Q4. - (Topic 1) 

You are developing an application by using C#. The application includes the following code segment. (Line numbers are included for reference only.) 

The DoWork() method must throw an InvalidCastException exception if the obj object is not of type IDataContainer when accessing the Data property. 

You need to meet the requirements. Which code segment should you insert at line 07? 

A. var dataContainer = (IDataContainer) obj; 

B. var dataContainer = obj as IDataContainer; 

C. var dataContainer = obj is IDataContainer; 

D. dynamic dataContainer = obj; 

Answer:

Explanation: 

http://msdn.microsoft.com/en-us/library/ms173105.aspx 

Q5. - (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:

Q6. - (Topic 1) 

You are developing a method named CreateCounters that will create performance counters for an application. 

The method includes the following code. (Line numbers are included for reference only.) 

You need to ensure that Counter1 is available for use in Windows Performance Monitor (PerfMon). 

Which code segment should you insert at line 16? 

A. CounterType = PerformanccCounterType.RawBase 

B. CounterType = PerformanceCounterType.AverageBase 

C. CounterType = PerformanceCounterType.SampleBase 

D. CounterType = PerformanceCounterType.CounterMultiBase 

Answer:

Explanation: 

PerformanceCounterType.SampleBase - A base counter that stores the number of sampling interrupts taken and is used as a denominator in the sampling fraction. The sampling fraction is the number of samples that were 1 (or true) for a sample interrupt. Check that this value is greater than zero before using it as the denominator in a calculation of SampleFraction. 

PerformanceCounterType.SampleFraction - A percentage counter that shows the average ratio of hits to all operations during the last two sample intervals. Formula: ((N 1 - N 0) / (D 1 - D 0)) x 100, where the numerator represents the number of successful operations during the last sample interval, and the denominator represents the change in the number of all operations (of the type measured) completed during the sample interval, using counters of type SampleBase. Counters of this type include Cache\Pin Read Hits %. http://msdn.microsoft.com/en-us/library/system.diagnostics.performancecountertype.aspx 

Q7. - (Topic 1) 

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? 

A. WaitForFullGCComplete() 

B. SuppressFinalize() 

C. WaitForFullGCApproach() 

D. WaitForPendingFinalizers() 

Answer:

Q8. - (Topic 2) 

You have the following code. (Line numbers are included for reference only). 

You need to complete the WriteTextAsync method. The solution must ensure that the code is not blocked while the file is being written. 

Which code should you insert at line 12? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Explanation: await sourceStream.WriteAsync(encodedText, 0, encodedText.Length); 

The following example has the statement await sourceStream.WriteAsync(encodedText, 0, 

encodedText.Length);, which is a contraction of the following two statements: 

Task theTask = sourceStream.WriteAsync(encodedText, 0, encodedText.Length); 

await theTask; 

Example: The following example writes text to a file. At each await statement, the method immediately exits. When the file I/O is complete, the method resumes at the statement that follows the await statement. Note that the async modifier is in the definition of methods that use the await statement. 

public async void ProcessWrite() 

string filePath = @"temp2.txt"; 

string text = "Hello World\r\n"; 

await WriteTextAsync(filePath, text); 

private async Task WriteTextAsync(string filePath, string text) 

byte[] encodedText = Encoding.Unicode.GetBytes(text); 

using (FileStream sourceStream = new FileStream(filePath, 

FileMode.Append, FileAccess.Write, FileShare.None, 

bufferSize: 4096, useAsync: true)) 

await sourceStream.WriteAsync(encodedText, 0, encodedText.Length); 

}; 

Reference: Using Async for File Access (C# and Visual Basic) 

https://msdn.microsoft.com/en-us/library/jj155757.aspx 

Q9. - (Topic 2) 

You are creating a console application named Appl. 

App1 retrieves data from the Internet by using JavaScript Object Notation (JSON). 

You are developing the following code segment (line numbers are included for reference only): 

You need to ensure that the code validates the JSON string. Which code should you insert at line 03? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Explanation: The JavaScriptSerializer Class Provides serialization and deserialization functionality for AJAX-enabled applications. 

The JavaScriptSerializer class is used internally by the asynchronous communication layer to serialize and deserialize the data that is passed between the browser and the Web server. You cannot access that instance of the serializer. However, this class exposes a public API. Therefore, you can use the class when you want to work with JavaScript Object Notation (JSON) in managed code. 

Q10. - (Topic 2) 

You need to write a console application that meets the following requirements: 

. If the application is compiled in Debug mode, the console output must display Entering debug mode. . If the application is compiled in Release mode, the console output must display Entering release mode. 

Which code should you use? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Explanation: When the C# compiler encounters an #if directive, followed eventually by an #endif directive, it will compile the code between the directives only if the specified symbol is defined. Unlike C and C++, you cannot assign a numeric value to a symbol; the #if statement in C# is Boolean and only tests whether the symbol has been defined or not. For example, #define DEBUG // ... #if DEBUG Console.WriteLine("Debug version"); #endif