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 are implementing a method named ProcessData that performs a long-running task. The ProcessData() method has the following method signature: 

public void ProcessData(List<decimal> values, CancellationTokenSource source, CancellationToken token) 

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 ProcessData() method performs the required actions. 

Which code segment should you use in the method body? 

A. if (token.IsCancellationRequested) return; 

B. throw new AggregateException(); 

C. token.ThrowIfCancellationRequested(); 

D. source.Cancel(); 

Answer:

Q2. - (Topic 1) 

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

C. Aes 

D. RNGCryptoServiceProvider 

Answer:

Q3. - (Topic 1) 

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 user to the BookTracker instance. What should you do? A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Q4. - (Topic 1) 

You are developing an application that will convert data into multiple output formats. 

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

You are developing a code segment that will produce tab-delimited output. All output routines implement the following interface: 

You need to minimize the completion time of the GetOutput() method. Which code segment should you insert at line 06? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Explanation: 

A String object concatenation operation always creates a new object from the existing string and the new data. A StringBuilder object maintains a buffer to accommodate the concatenation of new data. New data is appended to the buffer if room is available; otherwise, a new, larger buffer is allocated, data from the original buffer is copied to the new buffer, and the new data is then appended to the new buffer. The performance of a concatenation operation for a String or StringBuilder object depends on the frequency of memory allocations. A String concatenation operation always allocates memory, whereas a StringBuilder concatenation operation allocates memory only if the StringBuilder object buffer is too small to accommodate the new data. Use the String class if you are concatenating a fixed number of String objects. In that case, the compiler may even combine individual concatenation operations into a single operation. Use a StringBuilder object if you are concatenating an arbitrary number of strings; for example, if you're using a loop to concatenate a random number of strings of user input. 

http://msdn.microsoft.com/en-us/library/system.text.stringbuilder(v=vs.110).aspx 

Q5. DRAG DROP - (Topic 2) 

You are adding a function to a membership tracking application- The function uses an integer named memberCode as an input parameter and returns the membership type as a string. 

The function must meet the following requirements: 

Return "Non-Member" if the memberCode is 0. 

Return "Member" if the memberCode is 1. 

Return "Invalid" if the memberCode is any value other than 0 or 1. 

You need to implement the function 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:  

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

Explanation: * MatchCollection Represents the set of successful matches found by iteratively applying a regular expression pattern to the input string. The collection is immutable (read-only) and has no public constructor. The Regex.Matches method returns a MatchCollection object. 

* List<T>.Add Method Adds an object to the end of the List<T>. Incorrect: Not A: ICollection.SyncRoot Property For collections whose underlying store is not publicly available, the expected implementation is to return the current instance. Note that the pointer to the current instance might not be sufficient for collections that wrap other collections; those should return the underlying collection's SyncRoot property. 

Q7. DRAG DROP - (Topic 1) 

You develop an application that displays information from log files when errors occur. The application will prompt the user to create an error report that sends details about the error and the session to the administrator. 

When a user opens a log file by using the application, the application throws an exception and closes. 

The application must preserve the original stack trace information when an exception occurs during this process. 

You need to implement the method that reads the log files. 

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

Answer:  

Q8. HOTSPOT - (Topic 2) 

You are developing the following classes named: 

Class1 

Class2 

Class3 

All of the classes will be part of a single assembly named Assembly.dll. Assembly.dll will be used by multiple applications. 

All of the classes will implement the following interface, which is also part ofAssembly.dll: 

public interface Interface1 { void Method1(decimal amount); void Method2(decimal amount); } 

You need to ensure that the Method2 method for the Class3 class can be executed only when instances of the class are accessed through the Interface1 interface. The solution must ensure that calls to the Method1 method can be made either through the interface or through an instance of the class. 

Which signature should you use for each method? (To answer, select the appropriate signature for each method in the answer area.) 

Answer:  

Q9. - (Topic 1) 

You are developing a C# application that has a requirement to validate some string input data by using the Regex class. 

The application includes a method named ContainsHyperlink. The ContainsHyperlink() method will verify the presence of a URI and surrounding markup. 

The following code segment defines the ContainsHyperlink() method. (Line numbers are included for reference only.) 

The expression patterns used for each validation function are constant. 

You need to ensure that the expression syntax is evaluated only once when the Regex 

object is initially instantiated. 

Which code segment should you insert at line 04? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Explanation: 

RegexOptions.Compiled - Specifies that the regular expression is compiled to an assembly.This yields faster execution but increases startup time.This value should not be assigned to the Options property when calling the CompileToAssembly method. http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regexoptions.aspx Additional info http://stackoverflow.com/questions/513412/how-does-regexoptions-compiled-work 

Q10. - (Topic 2) 

You are developing an application that will be deployed to multiple computers. You set the assembly name. 

You need to create a unique identity for the application assembly. 

Which two assembly identity attributes should you include in the source code? (Each correct answer presents part of the solution. Choose two.) 

A. AssemblyTitleAttribute 

B. AssemblyCultureAttribute 

C. AssemblyVersionAttribute 

D. AssemblyKeyNameAttribute 

E. AssemblyFileVersion 

.... 

Answer: B,C 

Explanation: The AssemblyName object contains information about an assembly, which you can use to bind to that assembly. An assembly's identity consists of the following: 

Simple name 

Version number 

Cryptographic key pair 

Supported culture 

B: AssemblyCultureAttribute 

Specifies which culture the assembly supports. 

The attribute is used by compilers to distinguish between a main assembly and a satellite 

assembly. A main assembly contains code and the neutral culture's resources. A satellite 

assembly contains only resources for a particular culture, as in 

[assembly:AssemblyCultureAttribute("de")] 

C: AssemblyVersionAttribute 

Specifies the version of the assembly being attributed. 

The assembly version number is part of an assembly's identity and plays a key part in 

binding to the assembly and in version policy.