70-536 item pool(226 to 240) for IT examinee: Apr 2016 Edition

Approved of 70-536 exam question materials and free demo for Microsoft certification for IT engineers, Real Success Guaranteed with Updated 70-536 pdf dumps vce Materials. 100% PASS TS:MS.NET Framework 2.0-Application Develop Foundation exam Today!

2016 Apr 70-536 Study Guide Questions:

Q226. You are developing an application that will perform mathematical calculations. You need to ensure that the application is able to perform multiple calculations simultaneously. What should you do? 

A. Set the IdealProcessor property of the ProcessThread object. 

B. For each calculation, call the QueueUserWorkItem method of the ThreadPool class. 

C. Set the Process.GetCurrentProcess().BasePriority property to High. 

D. Set the ProcessorAffinity property of the ProcessThread object. 

Answer: B 


Q227. DRAG DROP 

You create a service application that monitors free space on a hard disk drive. 

You must ensure that the service application runs in the background and monitors the free space every minute. 

What should you do? To answer, you need to move the three appropriate actions from the list of actions to the answer area and arrange them in the correct order. 


Answer: 



Q228. You are developing a method to encrypt sensitive data with the Data Encryption Standard (DES) algorithm. Your method accepts the following parameters: 

The byte array to be encrypted, which is named message 

An encryption key, which is named key 

An initialization vector, which is named iv 

You need to encrypt the data. You also need to write the encrypted data to a MemoryStream object. 

Which code segment should you use? 

A. DES des = new DESCryptoServiceProvider(); 

ICryptoTransform crypto = des.CreateEncryptor(key, iv); 

MemoryStream cipherStream = new MemoryStream(); 

CryptoStream cryptoStream = new CryptoStream(cipherStream, 

crypto, CryptoStreamMode.Write); 

cryptoStream.Write(message, 0, message.Length); 

B. DES des = new DESCryptoServiceProvider(); 

des.BlockSize = message.Length; 

ICryptoTransform crypto = des.CreateEncryptor(key, iv); 

MemoryStream cipherStream = new MemoryStream(); 

CryptoStream cryptoStream = new CryptoStream(cipherStream, 

crypto, CryptoStreamMode.Write); 

cryptoStream.Write(message, 0, message.Length); 

C. DES des = new DESCryptoServiceProvider(); 

ICryptoTransform crypto = des.CreateEncryptor(); 

MemoryStream cipherStream = new MemoryStream(); 

CryptoStream cryptoStream = new CryptoStream(cipherStream, crypto, CryptoStreamMode.Write); 

cryptoStream.Write(message, 0, message.Length); 

D. DES des = new DESCryptoServiceProvider(); 

ICryptoTransform crypto = des.CreateDecryptor(key, iv); 

MemoryStream cipherStream = new MemoryStream(); 

CryptoStream cryptoStream = new CryptoStream(cipherStream, crypto, CryptoStreamMode.Write); 

cryptoStream.Write(message, 0, message.Length); 

Answer: A 


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


Q230. You need to ensure that the client-supplied DateTime value is stored in the correct format, 

Which code segment should you use as the body of the NormalizedOrderDate function in the OrderProcessor.es file? (Each correct answer presents a complete solution. Choose two.) 

A. return inputOrderDate.ToUniversalTime(); 

B. if (inputOrderDate.Kind != DateTimeKind.Utc) 

return inputOrderDate.ToUniversalTime(); 

ilse 

return inputOrderDate; 

C. if (inputOrderDate.Kind == DateTimeKind.Unspecified) 

return inputOrderDate.ToUniversalTime 

else 

return inputOrderDate; 

D. DateTime orderDateTime; 

if (IDateTime.TryParse(inputOrderDate.ToString("o"), out orderDateTime)) 

return orderDateTime.ToUniversalTime(); > 

else 

return orderDateTime.ToLocalTime() 

E. return inputOrderDate.ToLocalTime().ToUniversalTime(); 

F. return DateTime.ParseExact(inputOrderDate.ToString("o") , 

"o", DateTimeFormatlnfo.Invariantlnfo); 

Answer: DF 


70-536 study guide

Most up-to-date 70-536 free exam:

Q231. You are developing a custom event handler to automatically print all open documents. The event handler helps specify the number of copies to be printed. You need to develop a custom event arguments class to pass as a parameter to the event handler. Which code segment should you use? 

A. Public Class PrintingArgs 

Inherits EventArgs 

Private _copies As Integer 

Public Sub New(ByVal numberOfCopies As Integer) 

Me._copies = numberOfCopies 

End Sub 

Public ReadOnly Property Copies() As Integer 

Get 

Return Me._copies 

End Get 

End Property 

End Class 

B. Public Class PrintingArgs 

Private eventArgs As EventArgs 

Public Sub New(ByVal args As EventArgs) 

Me.eventArgs = args 

End Sub 

Public ReadOnly Property Args() As EventArgs 

Get 

Return eventArgs 

End Get 

End Property 

End Class 

C. Public Class PrintingArgs 

Private _copies As Integer 

Public Sub New(ByVal numberOfCopies As Integer) 

Me._copies = numberOfCopies 

End Sub 

Public ReadOnly Property Copies() As Integer 

Get 

Return Me._copies 

End Get End PropertyEnd Class 

D. Public Class PrintingArgs 

Inherits EventArgs 

Private copies As Integer 

End Class 

Answer: A 


Q232. You are developing an application for a client residing in Hong Kong. You need to display negative currency values by using a minus sign. Which code segment should you use? 

A. NumberFormatInfo= culture = 

gcnew CultureInfo("zh-HK")::NumberFormat; 

culture->CurrencyNegativePattern = 1; 

return numberToPrint->ToString("C", culture); 

B. NumberFormatInfo= culture = 

gcnew CultureInfo("zh-HK")::NumberFormat; 

culture->NumberNegativePattern = 1; 

return numberToPrint->ToString("C", culture); 

C. CultureInfo= culture = gcnew CultureInfo("zh-HK"); 

return numberToPrint->ToString("()", culture); 

D. CultureInfo= culture = gcnew CultureInfo("zh-HK"); 

return numberToPrint->ToString("-(0)", culture); 

Answer: A 


Q233. You need to write a code segment that performs the following tasks: 

· Retrieve the name of each paused service. 

· Passes the name of each paused service to the Add method of Collection1. 

Which code segment should you use? 

A. ManagementObjectSearcher searcher = 

new ManagementObjectSearcher(“Select * from Win32_Service where State = 

'Paused'”); 

foreach (ManagementObject svc in searcher.Get()) 

Collection1.Add(svc[“DisplayName”]); 

B. ManagementObjectSearcher searcher = 

new ManagementObjectSearcher("Select * from Win32_Service", "State 

='Paused'”); 

foreach (ManagementObject svc in searcher.Get()) 

Collection1.Add(svc[“DisplayName”]); 

C. ManagementObjectSearcher searcher = 

new ManagementObjectSearcher(“Select * from Win32_Service”); 

foreach (ManagemetnObject svc in searcher.Get()) 

if ((string) svc["State"] == "'Paused'") 

Collection1.Add(svc[“DisplayName”]); 

D. ManagementObjectSearcher searcher = new ManagementObjectSearcher(); 

searcher.Scope = new ManagementScope(“Win32_Service”); 

foreach (ManagementObject svc in searcher.Get()) 

if ((string)svc["State"] == "Paused") 

Collection1.Add(svc[“DisplayName”]); 

Answer: A 


Q234. 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. private void PerformCalculation() { 

... 

private void DoWork(){ 

CalculationValues myValues = new CalculationValues(); 

Thread newThread = new Thread( 

new ThreadStart(PerformCalculation)); 

newThread.Start(myValues); 

B. private void PerformCalculation (CalculationValues values) { 

... 

private void DoWork(){ 

CalculationValues myValues = new CalculationValues(); 

Application.DoEvents(); 

PerformCalculation(myValues); 

Application.DoEvents(); 

C. private void PerformCalculation() { 

... 

private void DoWork(){ 

CalculationValues myValues = new CalculationValues(); 

ThreadStart delStart = new 

ThreadStart(PerformCalculation); 

Thread newThread = new Thread(delStart); 

if (newThread.IsAlive) { 

newThread.Start(myValues); } } 

D. private void PerformCalculation(object values) { 

... 

private void DoWork(){ 

CalculationValues myValues = new CalculationValues(); 

Thread newThread = new Thread( 

new ParameterizedThreadStart(PerformCalculation)); 

newThread.Start(myValues); 

Answer: D 


Q235. You need to serialize an object of type List<int> in a binary format. The object is named data. Which code segment should you use? 

A. BinaryFormatter= formatter = gcnew BinaryFormatter(); 

MemoryStream= stream = gcnew MemoryStream(); 

formatter->Serialize(stream, data); 

B. BinaryFormatter= formatter = gcnew BinaryFormatter(); 

MemoryStream= stream = gcnew MemoryStream(); 

Capture c(formatter,stream); 

data->ForEach(gcnew Action<int>(%c,&Capture::Action)); 

C. BinaryFormatter= formatter = gcnew BinaryFormatter();a 

rray<Byte>= buffer = gcnew array<Byte>(data->Count); 

MemoryStream= stream = gcnew MemoryStream(buffer, true); 

formatter->Serialize(stream, data); 

D. BinaryFormatter= formatter = gcnew BinaryFormatter(); 

MemoryStream= stream = gcnew MemoryStream(); 

for (int i = 0; i < data->Count; i++) { 

formatter->Serialize(stream, data[i]); 

Answer: A 


70-536 download

Vivid 70-536 pdf exam:

Q236. DRAG DROP 

You are creating an application that provides information about the local computer. The application contains a form that lists each logical drive along with the drive properties, such as type, volume label, and capacity. 

You need to write a procedure that retrieves properties of each logical drive on the local computer. 

What should you do? 

To answer, move the three appropriate actions from the list of actions to the answer area and arrange them in the correct order. 


Answer: 



Q237. You work as an application developer at Contonso.com. You are currently creating a manifest-activated application on the Contonso.com's intranet using ClickOnce deployment. 

The network administrator informs you that each application has to identify its name, version, culture, and requested permissions. You need to ensure that the application you are creating uses the command line to display the required information. 

What should you do? 

A. Use the following code: 

ApplicationSecurityInfo appInfo = new ApplicationSecurityInfo (appDomain. 

CurrentDomain); 

Console.Writeline (appInfo.ApplicationID.Name); 

Console.Writeline (appInfo.ApplicationID.Version); 

Console.Writeline (appInfo.ApplicationID.Culture); 

Console.Writeline (appInfo.DefaultRequestSet.ToXml ()); 

B. Use the following code: 

ApplicationSecurityInfo appInfo = ActivationContext.GetCurrentContext (); 

Console.Writeline (appInfo.ApplicationID.Name); 

Console.Writeline (appInfo.ApplicationID.Version); 

Console.Writeline (appInfo.ApplicationID.Culture); 

Console.Writeline (appInfo.DefaultRequestSet.ToXml ()); 

C. Use the following code: 

ApplicationSecurityInfo appInfo = new ApplicationSecurityInfo ( appDomain. 

CurrentDomain.ActivationContext); 

Console.Writeline (appInfo.ApplicationID.Name); 

Console.Writeline (appInfo.ApplicationID.Version); 

Console.Writeline (appInfo.ApplicationID.Culture); 

Console.Writeline (appInfo.DefaultRequestSet.ToXml ()); 

D. Use the following code: 

ApplicationSecurityInfo appInfo = ActivationID.GetCurrentApplication (); 

Console.Writeline (appInfo.ApplicationID.Name); 

Console.Writeline (appInfo.ApplicationID.Version); 

Console.Writeline (appInfo.ApplicationID.Culture); 

Console.Writeline (appInfo.DefaultRequestSet.ToXml ()); 

Answer: C 


Q238. 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.Assert, _ 

Flags:=SecurityPermissionFlag.UnmanagedCode) _ 

B. <SecurityPermission( _ 

SecurityAction.Demand, _ 

Flags:=SecurityPermissionFlag.UnmanagedCode) _ 

C. <SecurityPermission( _ 

SecurityAction.LinkDemand, _ 

Flags:=SecurityPermissionFlag.UnmanagedCode) _ 

D. <SecurityPermission( _ 

SecurityAction.Deny, _ 

Flags:=SecurityPermissionFlag.UnmanagedCode) _ 

Answer: B 


Q239. You are developing a utility screen for a new client application. The utility screen displays a thermometer that conveys the current status of processes being carried out by the application. You need to draw a rectangle on the screen to serve as the background of the thermometer as shown in the exhibit. 


The rectangle must be filled with gradient shading. (Click the Exhibit button.) Which code segment should you choose? 

A. Rectangle= rectangle = gcnew Rectangle(10, 10, 450, 25); 

LinearGradientBrush= rectangleBrush = 

gcnew LinearGradientBrush(rectangle, Color::AliceBlue, 

Color::CornflowerBlue, 

LinearGradientMode::ForwardDiagonal); 

Pen= rectanglePen = gcnew Pen(rectangleBrush); 

Graphics= g = this->CreateGraphics(); 

g->FillRectangle(rectangleBrush, rectangle); 

B. RectangleF= rectangle = gcnew RectangleF(10f, 10f, 450f, 25f); 

SolidBrush= rectangleBrush = 

gcnew SolidBrush(Color::AliceBlue); 

Pen= rectanglePen = gcnew Pen(rectangleBrush); 

Graphics= g = this->CreateGraphics(); 

g->DrawRectangle(rectangleBrush, rectangle); 

C. Rectangle= rectangle = gcnew Rectangle(10, 10, 450, 25); 

LinearGradientBrush= rectangleBrush = 

gcnew LinearGradientBrush(rectangle, Color::AliceBlue, 

Color::CornflowerBlue, 

LinearGradientMode::ForwardDiagonal); 

Pen= rectanglePen = gcnew Pen(rectangleBrush); Graphics= g = this->CreateGraphics(); g->DrawRectangle(rectanglePen, rectangle); 

D. RectangleF= rectangle = gcnew RectangleF(10f, 10f, 450f, 25f); 

array<Point=>= points = gcnew array<Point=>= {gcnew Point(0, 0), 

gcnew Point(110, 145)}; 

LinearGradientBrush= rectangleBrush = 

gcnew LinearGradientBrush(rectangle, Color::AliceBlue, 

Color::CornflowerBlue, 

LinearGradientMode::ForwardDiagonal); 

Pen= rectanglePen = gcnew Pen(rectangleBrush); 

Graphics= g = this->CreateGraphics(); 

g->DrawPolygon(rectanglePen, points); 

Answer: A 


Q240. You are testing a component that serializes the Meeting class instances so that they can be saved to the file system. The Meeting class has the following definition: 

Public Class Meeting Private title As String Public roomNumber As Integer Public invitees As String() 

Public Sub New() 

End Sub 

Public Sub New(ByVal t As String) 

title = t 

End Sub 

End Class 

The component contains a procedure with the following code segment. 

Dim myMeeting As New Meeting("Goals") 

myMeeting.roomNumber = 1100 

Dim attendees As String() = New String(1) {"John", "Mary"} 

myMeeting.invitees = attendees 

Dim xs As New XmlSerializer(GetType(Meeting)) 

Dim writer As New StreamWriter("C:\Meeting.xml") 

xs.Serialize(writer, myMeeting) 

writer.Close() 

You need to identify the XML block that is written to the C:\Meeting.xml file as a result of running this procedure. 

Which XML block represents the content that will be written to the C:\Meeting.xml file? 

A. <?xml version="1.0" encoding="utf-8"?> 

<Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema" 

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 

<roomNumber>1100</roomNumber> 

<invitees> 

<string>John</string> 

<string>Mary</string> 

</invitees> 

</Meeting> 

B. <?xml version="1.0" encoding="utf-8"?> 

<Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema" 

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 

<title>Goals</title> 

<roomNumber>1100</roomNumber> 

<invitee>John</invitee> 

<invitee>Mary</invitee> 

</Meeting> 

C. <?xml version="1.0" encoding="utf-8"?> 

<Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema" 

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 

<roomNumber>1100</roomNumber> 

<invitees> 

<string>John</string> 

</invitees> 

<invitees> 

<string>Mary</string> 

</invitees> 

</Meeting> 

D. <?xml version="1.0" encoding="utf-8"?> 

<Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema" 

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 

title="Goals"> 

<roomNumber>1100</roomNumber> 

<invitees> 

<string>John</string> 

<string>Mary</string> 

</invitees> 

</Meeting> 

Answer: A