Mar 2016 updated: Examcollection Microsoft 70-536 test engine 166-180

★ Pass on Your First TRY ★ 100% Money Back Guarantee ★ Realistic Practice Exam Questions

Free Instant Download NEW 70-536 Exam Dumps (PDF & VCE):
Available on: https://www.certleader.com/70-536-dumps.html


Exam Code: 70-536 (Practice Exam Latest Test Questions VCE PDF)
Exam Name: TS:MS.NET Framework 2.0-Application Develop Foundation
Certification Provider: Microsoft
Free Today! Guaranteed Training- Pass 70-536 Exam.

2016 Mar 70-536 Study Guide Questions:

Q166. You need to create a method to clear a Queue named q. Which code segment should you use? 

A. foreach (object e in q) { 

B. Dequeue(); 

C. foreach (object e in q) { 

Enqueue(null); 

D. q.Clear(); 

E. q.Dequeue(); 

Answer: C 


Q167. You develop a service application named FileService. You deploy the service application to multiple servers on your network. 

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

01 public void StartService(string serverName){ 

02 ServiceController crtl = new 

03 ServiceController("FileService"); 

04 if (crtl.Status == ServiceControllerStatus.Stopped){ 

05 } 

06 } 

You need to develop a routine that will start FileService if it stops. The routine must start FileService on the server identified by the serverName input parameter. 

Which two lines of code should you add to the code segment? (Each correct answer presents part of the solution. Choose two.) 

A. Insert the following line of code between lines 03 and 04: crtl.Site.Name = serverName; 

B. Insert the following line of code between lines 04 and 05: crtl.ExecuteCommand(0); 

C. Insert the following line of code between lines 04 and 05: crtl.Continue(); 

D. Insert the following line of code between lines 04 and 05: crtl.Start(); 

E. Insert the following line of code between lines 03 and 04: crtl.ServiceName = serverName; 

F. Insert the following line of code between lines 03 and 04: crtl.MachineName = serverName; 

Answer: DF 


Q168. You create a DirectorySecurity object for the working directory. 

You need to identify the user accounts and groups that have read and write permissions. Which method should you use on the DirectorySecurity object? 

A. the GetAuditRules method 

B. the GetAccessRules method 

C. the AccessRuleFactory method 

D. the AuditRuleFactory method 

Answer: B 


Q169. You develop an application that appends text to existing text files. You need to write a code segment that enables the application to append text to a file named C:\MyFile.txt. The application must throw an exception if the file does not exist. You need to ensure that the other applications can read but not modify the file. Which code segment should you use? 

A. Dim fs As New FileStream("C:\MyFile.txt", _ 

FileMode.Open, FileAccess.ReadWrite, FileShare.Read) 

B. Dim fs As New FileStream("C:\MyFile.txt", _ 

FileMode.OpenOrCreate, FileAccess.ReadWrite, _ 

FileShare.Read) 

C. Dim fs As New FileStream("C:\MyFile.txt", _ 

FileMode.Open, FileAccess.Read, FileShare.ReadWrite) 

D. Dim fs As New FileStream("C:\MyFile.txt", _ 

FileMode.Append, FileAccess.ReadWrite) 

Answer: A 


Q170. You are developing an application to perform mathematical calculations. You develop a class named CalculationValues. You write a procedure named PerformCalculation that operates on an instance of the class. 

You need to ensure that the user interface of the application continues to respond while calculations are being performed. You need to write a code segment that calls the PerformCalculation procedure to achieve this goal. 

Which code segment should you use? 

A. public ref class CalculationValues {...}; 

public ref class Calculator { 

public : 

void PerformCalculation(Object= values) {} 

}; 

public ref class ThreadTest{ 

private : 

void DoWork (){ 

CalculationValues= myValues = gcnew CalculationValues(); 

Calculator = calc = gcnew Calculator(); 

Thread= newThread = gcnew Thread( 

gcnew ParameterizedThreadStart(calc, 

&Calculator::PerformCalculation)); 

newThread->Start(myValues); 

}; 

B. public ref class CalculationValues {...}; 

public ref class Calculator { 

public : 

void PerformCalculation() {} 

}; 

public ref class ThreadTest{ 

private : 

void DoWork (){ 

CalculationValues= myValues = gcnew CalculationValues(); 

Calculator = calc = gcnew Calculator(); 

ThreadStart= delStart = gcnew 

ThreadStart(calc, &Calculator::PerformCalculation); 

Thread= newThread = gcnew Thread(delStart); 

if (newThread->IsAlive) { 

newThread->Start(myValues); 

}; 

C. public ref class CalculationValues {...}; 

public ref class Calculator { 

public : 

void PerformCalculation(CalculationValues= values) {} 

}; 

public ref class ThreadTest{ 

private : 

void DoWork (){ 

CalculationValues= myValues = gcnew CalculationValues(); 

Calculator = calc = gcnew Calculator(); 

Application::DoEvents(); 

calc->PerformCalculation(myValues); 

Application::DoEvents(); 

}; 

D. public ref class CalculationValues {...}; 

public ref class Calculator { 

public : 

void PerformCalculation() {} 

}; 

public ref class ThreadTest{ 

private : 

void DoWork (){ 

CalculationValues= myValues = gcnew CalculationValues(); 

Calculator = calc = gcnew Calculator(); 

Thread= newThread = gcnew Thread( 

gcnew ThreadStart(calc, &Calculator::PerformCalculation)); 

newThread->Start(myValues); 

}; 

Answer: A 


70-536 free download

Most recent 70-536 dumps:

Q171. You are developing a fiscal report for a customer. Your customer has a main office in the United States and a satellite office in Mexico. You need to ensure that when users in the satellite office generate the report, the current date is displayed in Mexican Spanish format. Which code segment should you use? 

A. CultureInfo= culture = gcnew CultureInfo("es-MX", false); 

DateTimeFormatInfo= dtfi = culture->DateTimeFormat; 

DateTime= dt = gcnew DateTime(DateTime::Today::Year, 

DateTime::Today::Month, DateTime::Today::Day); 

String= dateString = dt->ToString(dtfi->LongDatePattern); 

B. String= dateString = 

DateTimeFormatInfo::CurrentInfo 

::GetMonthName(DateTime::Today::Month); 

String= dateString = DateTime::Today::Month::ToString("es-MX"); 

C. Calendar= cal = gcnew CultureInfo("es-MX", false)::Calendar; 

DateTime= dt = gcnew DateTime(DateTime::Today::Year, 

DateTime::Today::Month, DateTime::Today::Day); 

String= dateString = dt->ToString(); 

Answer: A 


Q172. You are developing a method to hash data with the Secure Hash Algorithm. The data is passed to your method as a byte array named message. You need to compute the hash of the incoming parameter by using SHA1. You also need to place the result into a byte array named hash. Which code segment should you use? 

A. SHA1 sha = new SHA1CryptoServiceProvider(); 

sha.GetHashCode(); 

byte[] hash = sha.Hash; 

B. SHA1 sha = new SHA1CryptoServiceProvider(); 

byte[] hash = BitConverter.GetBytes(sha.GetHashCode()); 

C. SHA1 sha = new SHA1CryptoServiceProvider(); 

byte[] hash = sha.ComputeHash(message); 

D. SHA1 sha = new SHA1CryptoServiceProvider(); 

byte[] hash = null; 

sha.TransformBlock( 

message, 0, message.Length, hash, 0); 

Answer: C 


Q173. You develop an application that appends text to existing text files. You need to write a code segment that enables the application to append text to a file named C:\MyFile.txt. The application must throw an exception if the file does not exist. You need to ensure that the other applications can read but not modify the file. Which code segment should you use? 

A. FileStream fs = new FileStream(@"C:\MyFile.txt", FileMode.Open, FileAccess.ReadWrite, FileShare.Read); 

B. FileStream fs = new FileStream(@"C:\MyFile.txt", FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Read); 

C. FileStream fs = new FileStream(@"C:\MyFile.txt", FileMode.Open, FileAccess.Read, FileShare.ReadWrite); 

D. FileStream fs = new FileStream(@"C:\MyFile.txt", FileMode.Append, FileAccess.ReadWrite); 

Answer: A 


Q174. You need to ensure that the list of queued e-mail messages is sorted by priority value from highest to lowest. Which code segment should you add to line LE15 of the Local Entities? 

A. Return Priority.GetValueOrDefault(-1).CompareTo(other.Priority.GetValueOrDefault(-1)) * -1 

B. Return Priority.GetValueOrDefault(-1).CompareTo(other.Priority.GetValueOrDefault(-1)) 

C. Return Priority.Value.CompareTo(other.Priority.Value) 

D. Return Priority.Value.CompareTo(other.Priority.Value) * -1 

Answer: A 


Q175. You are developing a method to call a COM component. You need to use declarative security to explicitly request the runtime to perform a full stack walk. You must ensure that all callers have the required level of trust for COM interop before the callers execute your method. Which attribute should you place on the method? 

A. [SecurityPermission( 

SecurityAction.Demand, 

Flags=SecurityPermissionFlag.UnmanagedCode) 

B. [SecurityPermission( 

SecurityAction.Assert, 

Flags = SecurityPermissionFlag.UnmanagedCode) 

C. [SecurityPermission( 

SecurityAction.Deny, 

Flags = SecurityPermissionFlag.UnmanagedCode) 

D. [SecurityPermission( 

SecurityAction.LinkDemand, 

Flags=SecurityPermissionFlag.UnmanagedCode) 

Answer: A 


70-536 simulations

Best Quality 70-536 pdf exam:

Q176. You work as aplication developer at Cer-Tech.com. You have recently created an aplication that includes the code shown below. 

You now need to invoke the GetFileContents method asynchronously. 

You have to ensure that the code you use to invoke the GetFileContents method will continue to process other user instructions, and displays the results as soon as the GetFileContents method finishes processing. 

What should you do? 

A. Use the following code: 

GetFileContentsDel delAsync = new GetFileContentsDel (GetFileContents); 

IAsyncResult result = delAsync.BeginInvoke (null, null); 

while (!result.IsCompleted) 

//Process other user instructions } string strFile - delAsync.EndInvoke (result); 

B. Use the following code: 

GetFileContentsDel delAsync = new GetFileContentsDel (GetFileContents); 

string strFile - delAsync.Invoke (); 

C. Use the following code: 

string strFile - delAsync.Invoke (); 

D. Use the following code: 

GetFileContentsDel delAsync = new GetFileContentsDel (GetFileContents); 

IAsyncResult result = delAsync.BeginInvoke (null, null); 

//Process other user instructions 

string strFile - delAsync.EndInvoke (result); 

Answer: A 


Q177. You work as an application developer. You are currently in the process of creating a new application. 

You are required to read compressed data files that have been sent by company's sales offices. These data files are less than 4 GB in size, but were compressed without cyclic redundancy. 

You want to write a method that receives the compressed files and return the uncompressed data as a byte array. 

What should you do? 

A. Use the following code: 

public byte [] DecompressFile (string file) 

FileStream fs = new FileStream (file, FileMode, Open); 

DeflateStream cs = new DeflateStream (fs, CompressionModc. Decompress, true) 

byte [ ] data = new byte [fs.Length - l]; 

cs. Read (data, (), data, Length); 

cs. Close (); 

return data; 

B. Use the following code; 

public byte [] DecompressFile (string file) 

FileStream fs = new FileStream (file, FileModc, Open); GZipStream cs = new GZipStream 

{fs, Compress iotiMndo. Decompress) byte [ ] data = new byte [fs. Length - 1]; 

cs. Read (data, 0, data.Length); 

return data: 

C. Use the following code: 

public byte [] DecompressFile (string file) 

FileStream fs = new FileStream (file, FileMode,Open); 

DeflateStream cs = new DeflateStream (fs, CompressionMode. Decompress) 

byte [ ] data = new byte [fs.Length - l]; 

cs. Read (data, 0, data.Length); 

return data; 

D. Use the following code: 

public byte [] DecompressFile (string file) 

FileStream. fs = new FileStream (file, FileMode. Open); 

GZipStream cs = new GZipStream (fs, CompressionMode. Decompress, true) ; 

byte [ ] data = new byte [fs. Length - 1]; 

cs. Read (data, 0, data. Length); 

cs. close 0; 

return data; 

Answer: A 


Q178. DRAG DROP 

You need to design The process for keeping track of each user’s login to the administrative site. 

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


Answer: 



Q179. You develop a service application named PollingService that periodically calls long-running procedures. These procedures are called from the DoWork method. 

You use the following service application code: 

partial class PollingService : ServiceBase { bool blnExit = false; 

public PollingService() { } 

protected override void OnStart(string[] args) { do { DoWork(); } while (!blnExit); } 

protected override void OnStop() { blnExit = true; } 

private void DoWork() { ... } 

When you attempt to start the service, you receive the following error message: Could not start the PollingService service on the local computer. Error 1053: The service did not respond to the start or control request in a timely fashion. 

You need to modify the service application code so that the service starts properly. 

What should you do? 

A. Move the loop code from the OnStart method into the DoWork method. 

B. Add a class-level System.Timers.Timer variable to the service class code. Move the call to the DoWork method into the Elapsed event procedure of the timer, set the Enabled property of the timer to True, and call the Start method of the timer in the OnStart method. 

C. Move the loop code into the constructor of the service class from the OnStart method. 

D. Drag a timer component onto the design surface of the service. Move the calls to the long-running procedure from the OnStart method into the Tick event procedure of the timer, set the Enabled property of the timer to True, and call the Start method of the timer in the OnStart method. 

Answer: B 


Q180. You create an application that stores information about your customers who reside in various regions. You are developing internal utilities for this application. You need to gather regional information about your customers in Canada. Which code segment should you use? 

A. Dim objCulture As New CultureInfo("CA") 

... 

B. For Each objCulture As CultureInfo In _ 

CultureInfo.GetCultures(CultureTypes.SpecificCultures) 

... 

Next 

C. Dim objRegion As New RegionInfo("CA") 

... 

D. Dim objRegion As New RegionInfo("") 

If objRegion.Name = "CA" Then 

... 

End If 

Answer: C