The latest Microsoft 70-536 from exam4actual (III)

Exam Number/Code: 70-536
Exam Name: TS:MS.NET Framework 2.0-Application Develop Foundation
"MCTS MCPD ", also known as 70-536 exam, is a Microsoft certification.
Preparing for the 70-536 exam? Searching 70-536 Test Questions, 70-536 Practice Exam, 70-536 Dumps?
With the complete collection of questions and answers, Exam4actual has assembled to take you through 168 Q&A to your 70-536 Exam preparation. In the70-536 exam resources, you will cover every field and category in MCTS MCPD helping to ready you for your successful Microsoft Certification.

Free 70-536 Demo Download
Exam4actual offers free demo for MCTS MCPD 70-536 exam (TS:MS.NET Framework 2.0-Application Develop Foundation). You can check out the interface, question quality and usability of our practice exams before you decide to buy it. We are the only one site can offer demo for almost all products.

11.You create an application to send a message by email.
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 email
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";message.Dispose();
B. 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);
C. 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);
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";
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);
Answer: C
12.You need to create a dynamic assembly named MyAssembly. You also need to save the assembly to
disk. Which code segment should you use?

A.
AssemblyName myAssemblyName = new AssemblyName();
myAssemblyName.Name = "MyAssembly";
AssemblyBuilder myAssemblyBuilder =AppDomain.CurrentDomain.DefineDynamicAssembly
(myAssemblyName, AssemblyBuilderAccess.Run);
myAssemblyBuilder.Save("MyAssembly.dll");
B. AssemblyName myAssemblyName = new AssemblyName();myAssemblyName.Name =
"MyAssembly";
AssemblyBuilder myAssemblyBuilder =AppDomain.CurrentDomain.DefineDynamicAssembly
(myAssemblyName, AssemblyBuilderAccess.Save);
myAssemblyBuilder.Save("MyAssembly.dll");
C. AssemblyName myAssemblyName =new AssemblyName();
AssemblyBuilder myAssemblyBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly
(myAssemblyName, AssemblyBuilderAccess.RunAndSave);
myAssemblyBuilder.Save("MyAssembly.dll");
D. AssemblyName myAssemblyName =new AssemblyName("MyAssembly");
AssemblyBuilder myAssemblyBuilder =AppDomain.CurrentDomain.DefineDynamicAssembly
(myAssemblyName, AssemblyBuilderAccess.Save);
myAssemblyBuilder.Save("C. //MyAssembly.dll");
Answer: B
13.You need to write a code segment that performs the following tasks: ?
Retrieves the name of each paused service. ?
Passes the name 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 (ManagementObject 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
14.Your company uses an application named Application1 that was compiled by using the .NET
Framework version 1.0. The application currently runs on a shared computer on which the .NET
Framework versions 1.0 and 1.1 are installed. You need to move the application to a new computer on
which the .NET Framework versions 1.1 and 2.0 are installed. The application is compatible with the .NET
Framework 1.1, but it is incompatible with the .NET Framework 2.0. You need to ensure that the
application will use the .NET Framework version 1.1 on the new computer. What should you do?
A. Add the following XML element to the application configuration file.
<configuration>
<startup>
<supportedRuntime version="1.1.4322" />
<startup>
</configuration>
B. Add the following XML element to the application configuration file.
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemasmicrosoftcom:
asm.v1">

<
dependentAssembly>
<assemblyIdentity name="Application1"
publicKeyToken="32ab4ba45e0a69a1" culture="neutral" />
<bindingRedirect oldVersion="1.0.3075.0" newVersion="1.1.4322.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
C. Add the following XML element to the machine configuration file.
<configuration>
<startup>
<requiredRuntime version="1.1.4322" />
<startup>
</configuration>
D. Add the following XML element to the machine configuration file.
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemasmicrosoftcom:
asm.v1">
<dependentAssembly>
<assemblyIdentity name="Application1"
publicKeyToken="32ab4ba45e0a69a1" culture="neutral" />
<bindingRedirect oldVersion="1.0.3075.0" newVersion="1.1.4322.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Answer: A

15.You are using the Microsoft Visual Studio 2005 IDE to examine the output of a method that returns a

string.
You assign the output of the method to a string variable named fName. You need to write a code
segment that prints the following on a single line The message. "Test Failed. " The value of fName if the
value of fName does not equal "John" You also need to ensure that the code segment simultaneously
facilitates uninterrupted execution of the application. Which code segment should you use?
A. Debug.Assert(fName == "John", "Test FaileD. ", fName);
B. Debug.WriteLineIf(fName != "John", fName, "Test Failed");
C. if (fName != "John") {Debug.Print("Test FaileD. "); Debug.Print(fName); }
D. if (fName != "John") {Debug.WriteLine("Test FaileD. "); Debug.WriteLine(fName); }
Answer: B

exam4actual help you to pass any it exams.


  ---★ This article is reproduced from『Jerry_king ※ http://www.9kanshu.com  Original Address:http://9kanshu.com/view.asp?id=89

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值