Mar 2016 updated: Pass4sure Microsoft 70-536 exam engine 256-270

★ 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


70-536 Product Description:
Exam Number/Code: 70-536 vce
Exam name: TS:MS.NET Framework 2.0-Application Develop Foundation
n questions with full explanations
Certification: Microsoft Certification
Last updated on Global synchronizing

Instant Access to Free VCE Files: Microsoft 70-536 TS:MS.NET Framework 2.0-Application Develop Foundation

70-536 examcollection

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:

Q256. You create an application to send a message by e-mail. An SMTP server is available on the local subnet. The SMTP server is named smtp.contoso.com. 

To test the application, you use a source address, me@contoso.com, and a target address, you@contoso.com. 

You need to transmit the e-mail message. 

Which code segment should you use? 

A. MailAddress addrFrom = 

new MailAddress("me@contoso.com", "Me"); 

MailAddress addrTo = 

new MailAddress("you@contoso.com", "You"); 

MailMessage message = new MailMessage(addrFrom, addrTo); 

message.Subject = "Greetings!"; 

message.Body = "Test"; 

SocketInformation info = new SocketInformation(); 

Socket client = new Socket(info); 

System.Text.ASCIIEncoding enc = 

new System.Text.ASCIIEncoding(); 

byte[] msgBytes = enc.GetBytes(message.ToString()); 

client.Send(msgBytes); 

B. MailAddress addrFrom = new MailAddress("me@contoso.com"); 

MailAddress addrTo = new MailAddress("you@contoso.com"); 

MailMessage message = new MailMessage(addrFrom, addrTo); 

message.Subject = "Greetings!"; 

message.Body = "Test"; 

SmtpClient client = new SmtpClient("smtp.contoso.com"); 

client.Send(message); 

C. string strSmtpClient = "smtp.contoso.com"; 

string strFrom = "me@contoso.com"; 

string strTo = "you@contoso.com"; 

string strSubject = "Greetings!"; 

string strBody = "Test"; 

MailMessage msg = 

new MailMessage(strFrom, strTo, strSubject, strSmtpClient); 

D. MailAddress addrFrom = 

new MailAddress("me@contoso.com", "Me"); 

MailAddress addrTo = 

new MailAddress("you@contoso.com", "You"); 

MailMessage message = new MailMessage(addrFrom, addrTo); 

message.Subject = "Greetings!"; 

message.Body = "Test"; 

message.Dispose(); 

Answer: B 


Q257. 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. Calendar cal = new CultureInfo("es-MX", false).Calendar; 

DateTime dt = new DateTime(DateTime.Today.Year, 

DateTime.Today.Month, DateTime.Today.Day); 

Strong dateString = dt.ToString(); 

B. string dateString = DateTime.Today.Month.ToString("es-MX"); 

C. string dateString = 

DateTimeFormatInfo.CurrentInfo 

GetMonthName(DateTime.Today.Month); 

D. DateTimeFormatInfo dtfi = new CultureInfo("es-MX", false).DateTimeFormat; 

DateTime dt = new DateTime(DateTime.Today.Year, 

DateTime.Today.Month, DateTime.Today.Day); 

string dateString = dt.ToString(dtfi.LongDatePattern); 

Answer: D 


Q258. You need to store Product, MainProduct, and SecondaryProduct instances that end users place in the shopping cart by using a collection. Which code segment should you use to initiate the collection? 

A. List<Product> products = new List<Product>(); 

B. ArrayList products = new ArrayList(); 

C. IList<Product> products = new List<Product>(); 

D. SortedList<string, Product> products = new SortedList<string, Product>(); 

Answer: B 


Q259. You need to implement the EmailSenderService class so that the service sends queued e-mail messages when it is started and stops sending e-mail messages when it is stopped. Which code segments should you use? (Each correct answer is part of a complete solution. Choose two.) 

A. protected override void OnStop() 

Poller p = new Poller(); 

B. Stop(); } 

C. protected void Start(string[] args) { 

D. Start(); } 

E. protected void Stop() { 

F. Stop(); } 

G. protected override void OnStart(string[] args) { 

H. Start(); } 

I. protected override void OnStop() { 

J. Stop(); } 

K. protected void OnStart() { 

L. Start(); } 

Answer: DE 


Q260. You are changing the security settings of a file named MyData.xml. You need to preserve the existing inherited access rules. You also need to prevent the access rules from inheriting changes in the future. Which code segment should you use? 

A. Dim objSecurity As New FileSecurity( _ 

"MyData.xml", AccessControlSections.All) 

objSecurity.SetAccessRuleProtection(True, True) 

File.SetAccessControl("MyData.xml", objSecurity) 

B. Dim objSecurity As FileSecurity = _ 

File.GetAccessControl("MyData.xml") 

objSecurity.SetAccessRuleProtection(True, True) 

C. Dim objSecurity As New FileSecurity() 

objSecurity.SetAccessRuleProtection(True, True) 

File.SetAccessControl("MyData.xml", objSecurity) 

D. Dim objSecurity As FileSecurity = _ 

File.GetAccessControl("MyData.xml") 

objSecurity.SetAuditRuleProtection(True, True) 

File.SetAccessControl("myData.xml", objSecurity) 

Answer: A 


70-536 test questions

Updated 70-536 exam fees:

Q261. 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 { 

private EventArgs eventArgs; 

public PrintingArgs(EventArgs ea) { 

this.eventArgs = ea; 

public EventArgs Args { 

get { return eventArgs; } 

B. public class PrintingArgs : EventArgs { 

private int copies; 

public PrintingArgs(int numberOfCopies) { 

this.copies = numberOfCopies; 

public int Copies { 

get { return this.copies; } 

C. public class PrintingArgs : EventArgs { 

private int copies; 

D. public class PrintingArgs { 

private int copies; 

public PrintingArgs(int numberOfCopies) { 

this.copies = numberOfCopies; 

public int Copies { 

get { return this.copies; } 

Answer: B 


Q262. You are developing a custom-collection class. You need to create a method in your class. You need to ensure that the method you create in your class returns a type that is compatible with the Foreach statement. Which criterion should the method meet? 

A. The method must return a type of either IEnumerator or IEnumerable. 

B. The method must return a type of IComparable. 

C. The method must explicitly contain a collection. 

D. The method must be the only iterator in the class. 

Answer: A 


Q263. You are developing a server application that will transmit sensitive information on a network. You create an X509Certificate object named certificate and a TcpClient object named client. You need to create an SslStream to communicate by using the Transport Layer Security 1.0 protocol. Which code segment should you use? 

A. SslStream ssl = new SslStream(client.GetStream()); 

ssl.AuthenticateAsServer( 

certificate, false, SslProtocols.Ssl2, true); 

B. SslStream ssl = new SslStream(client.GetStream()); 

ssl.AuthenticateAsServer( 

certificate, false, SslProtocols.None, true); 

C. SslStream ssl = new SslStream(client.GetStream()); 

ssl.AuthenticateAsServer( 

certificate, false, SslProtocols.Tls, true); 

D. SslStream ssl = new SslStream(client.GetStream()); 

ssl.AuthenticateAsServer( 

certificate, false, SslProtocols.Ssl3, true); 

Answer: C 


Q264. You are developing an application that stores data about your company's sales and technical support teams. You need to ensure that the name and contact information for each person is available as a single collection when a user queries details about a specific team. You also need to ensure that the data collection guarantees type safety. 

Which code segment should you use? 

A. Dim team As Hashtable = New Hashtable () 

team.Add (1, " Hance ") 

team.Add (2, "Jim") 

team.Add (3, " Hanif ") 

team.Add (4, " Kerim ") 

team.Add (5, "Alex") 

team.Add (6, "Mark") 

team.Add (7, "Roger") 

team.Add (8, "Tommy") 

B. Dim team As ArrayList = New ArrayList () 

team.Add ("1, Hance ") 

team.Add ("2, Jim") 

team.Add ("3, Hanif ") 

team.Add ("4, Kerim ") 

team.Add ("5, Alex") 

team.Add ("6, Mark") 

team.Add ("7, Roger") 

team.Add ("8, Tommy") 

C. Dim team As New Dictionary(Of Integer, String) 

team.Add (1, " Hance ") 

team.Add (2, "Jim") 

team.Add (3, " Hanif ") 

team.Add (4, " Kerim ") 

team.Add (5, "Alex") 

team.Add (6, "Mark") 

team.Add (7, "Roger") 

team.Add (8, "Tommy") 

D. Dim team As String() = New String() 

{ _ "1, Hance ", _ "2, Jim", _ "3, Hanif ", _ "4, Kerim ", _ "5, Alex", 

_ "6, Mark", _ "7, Roger", _ "8, Tommy"} 

Answer: C 


Q265. You are developing a method to decrypt data that was encrypted with the Triple DES Algorithm. The method accepts the following parameters: 

The byte array to be decrypted, which is named cipherMessage 

The key, which is named key 

An initialization vector, which is named iv 

You need to decrypt the message by using the TripleDES class and place the result in a string. 

Which code segment should you use? 

A. Dim objDES As New TripleDESCryptoServiceProvider 

Dim objCrypto As ICryptoTransform = _ 

objDES.CreateDecryptor() 

Dim cipherStream As New MemoryStream(cipherMessage) 

Dim cryptoStream As New CryptoStream( _ 

cipherStream, objCrypto, CryptoStreamMode.Read) 

Dim message As String 

message = New StreamReader(cryptoStream).ReadToEnd 

B. Dim objDES As New TripleDESCryptoServiceProvider 

objDES.FeedbackSize = cipherMessage.Length 

Dim objCrypto As ICryptoTransform = _ 

objDES.CreateDecryptor(key, iv) 

Dim cipherStream As New MemoryStream(cipherMessage) 

Dim cryptoStream As New CryptoStream( _ 

cipherStream, objCrypto, CryptoStreamMode.Read) 

Dim message As String 

message = New StreamReader(cryptoStream).ReadToEnd 

C. Dim objDES As New TripleDESCryptoServiceProvider 

Dim objCrypto As ICryptoTransform = _ 

objDES.CreateDecryptor(key, iv) 

Dim cipherStream As New MemoryStream(cipherMessage) 

Dim cryptoStream As New CryptoStream( _ 

cipherStream, objCrypto, CryptoStreamMode.Read) 

Dim message As String 

message = New StreamReader(cryptoStream).ReadToEnd 

D. Dim objDES As New TripleDESCryptoServiceProvider 

objDES.BlockSize = cipherMessage.Length 

Dim objCrypto As ICryptoTransform = _ 

objDES.CreateDecryptor(key, iv) 

Dim cipherStream As New MemoryStream(cipherMessage) 

Dim cryptoStream As New CryptoStream( _ 

cipherStream, objCrypto, CryptoStreamMode.Read) 

Dim message As String 

message = New StreamReader(cryptoStream).ReadToEnd 

Answer: C 


70-536 free question

Validated 70-536 practice exam:

Q266. You are creating a class to compare a specially-formatted string. The default collation comparisons do not apply. You need to implement the IComparable<string> interface. Which code segment should you use? 

A. public class Person : IComparable<string> 

public int CompareTo(string other) { } 

B. public class Person : IComparable<string> 

public int CompareTo(object other) { } 

C. public class Person : IComparable<string> 

public bool CompareTo(string other) { } 

D. public class Person : IComparable<string> 

public bool CompareTo(object other) { } 

Answer: A 


Q267. 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 ref class PrintingArgs { 

public : 

EventArgs Args; 

PrintingArgs(EventArgs ea) { 

this->Args = ea; 

}; 

B. public ref class PrintingArgs { 

public : 

int Copies; 

PrintingArgs (int numberOfCopies) { 

this->Copies = numberOfCopies; 

}; 

C. public ref class PrintingArgs : public EventArgs { 

public : int Copies; }; 

D. public ref class PrintingArgs : public EventArgs { 

public : 

int Copies; 

PrintingArgs(int numberOfCopies) { 

this->Copies = numberOfCopies; 

}; 

Answer: D 


Q268. Your application uses two threads, named threadOne and threadTwo. You need to modify the code to prevent the execution of threadOne until threadTwo completes execution. What should you do? 

A. Call the Sleep method of threadOne. 

B. Use a WaitCallback delegate to synchronize the threads. 

C. Configure threadTwo to run at a higher priority. 

D. Call the SpinLock method of threadOne. 

E. Configure threadOne to run at a lower priority. 

Answer: B 


Q269. You are creating a class that uses unmanaged resources. This class maintains references to managed resources on other objects. You need to ensure that users of this class can explicitly release resources when the class instance ceases to be needed. Which three actions should you perform? (Each correct answer presents part of the solution. Choose three.) 

A. Define the class such that it implements the IDisposable interface. 

B. Define the class such that it inherits from the WeakReference class. 

C. Create a Dispose method that calls System.GC.Collect to force garbage collection. 

D. Create a Dispose method that releases unmanaged resources and calls methods on other objects to release the managed resources. 

E. Create a class destructor that calls methods on other objects to release the managed resources. 

F. Create a class destructor that releases the unmanaged resources. 

Answer: ADF 


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

ref class PollingService : public ServiceBase { 

public : 

static bool blnExit = false; 

protected : 

override void OnStart(String= args) { 

do { 

DoWork(); 

} while (!blnExit); 

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 into the constructor of the service class from the OnStart method. 

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

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

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

Answer: D