Exam 70-536 : .NET Framework Application Development Foundation Part – 15

Question: You write the following code to implement the CompanyClass.MyMethod function. public class CompanyClass { public int MyMethod(int arg) { return arg; } } You need to call the CompanyClass.MyMethod function dynamically from an unrelated class in your assembly. Which code segment should you use? CompanyClass myClass = new CompanyClass();… Continue reading

Exam 70-536 : .NET Framework Application Development Foundation Part – 14

Question: You need to create a class definition that is interoperable along with COM. You need to ensure that COM applications can create instances of the class and can call the GetAddress method. Which code segment should you use? public class Customer { string addressString; public Customer(string address) { addressString… Continue reading

Exam 70-536 : .NET Framework Application Development Foundation Part – 13

Question: You are developing an application that dynamically loads assemblies from an application directory. You need to write a code segment that loads an assembly named Company1.dll into the current application domain. Which code segment should you use? AppDomain domain = AppDomain.CurrentDomain; string myPath = Path.Combine(domain.BaseDirectory, “Company1.dll”); Assembly asm =… Continue reading

Exam 70-536 : .NET Framework Application Development Foundation Part – 12

Question: You create a method that runs by using the credentials of the end user. You need to use Microsoft Windows groups to authorize the user. You must add a code segment that identifies whether a user is in the local group named Clerk. Which code segment should you use?… Continue reading

Exam 70-536 : .NET Framework Application Development Foundation Part – 11

Question: 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?… Continue reading

Exam 70-536 : .NET Framework Application Development Foundation Part – 10

Question: You work as a developer at Company.com. You are creating an assembly named Company1. Company1 contains a public method. The global cache contains a second assembly named Company2. You must ensure that the public method is only called from Company2. Which permission class should you use? GacIdentityPermission PublisherIdentityPermission DataProtectionPermission… Continue reading

Exam 70-536 : .NET Framework Application Development Foundation Part – 9

Question: You create a class library that contains the class hierarchy defined in the following code segment. (Line numbers are included for reference only.) 01 public class Group { 02 public Employee[] Employees; 03 } 04 public class Employee { 05 public string Name; 06 } 07 public class Manager… Continue reading

Exam 70-536 : .NET Framework Application Development Foundation Part – 8

Question: You are defining a class named CompanyClass that contains several child objects. CompanyClass contains a method named ProcessChildren that performs actions on the child objects. CompanyClass objects will be serializable. You need to ensure that the ProcessChildren method is executed after the CompanyClass object and all its child objects… Continue reading

Exam 70-536 : .NET Framework Application Development Foundation Part – 7

Question: You create a class library that is used by applications in three departments of your company. The library contains a Department class with the following definition. public class Department { public string name; public string manager; } Each application uses a custom configuration section to store departmentspecific values in… Continue reading

Exam 70-536 : .NET Framework Application Development Foundation Part – 6

Question: You are testing a method that examines a running process. This method returns an ArrayList containing the name and full path of all modules that are loaded by the process. You need to list the modules loaded by a process named C:\TestApps\Process1.exe. Which code segment should you use? ArrayList… Continue reading