1. Question: 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);

    Note: Not available
    1. Report
  2. Question: 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]);
    }

    Note: Not available
    1. Report
  3. Question: 

    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 =
    gcnew ManagementObjectSearcher( "Select * from Win32_Service");
    for each (ManagementObject= svc in searcher->Get()) { if ((String=) svc["State"] == "'Paused'") {
    Collection1->Add(svc["DisplayName"]);
    }
    "A Composite Solution With Just One Click" - Certification Guaranteed 258 Microsoft 70-536 Exam
    }

    B
    ManagementObjectSearcher= searcher =
    gcnew ManagementObjectSearcher(
    "Select * from Win32_Service", "State = 'Paused'");
    for each (ManagementObject= svc in searcher->Get()) { Collection1->Add(svc["DisplayName"]);
    }

    C
    ManagementObjectSearcher= searcher =
    gcnew ManagementObjectSearcher(
    "Select * from Win32_Service where State = 'Paused'"); for each (ManagementObject= svc in searcher->Get()) { Collection1->Add(svc["DisplayName"]);
    }

    D
    ManagementObjectSearcher= searcher =
    gcnew ManagementObjectSearcher();
    searcher->Scope = gcnew ManagementScope("Win32_Service"); for each (ManagementObject= svc in searcher->Get()) { if ((String=)svc["State"] == "Paused") {
    Collection1->Add(svc["DisplayName"]);
    }
    }

    Note: Not available
    1. Report
  4. Question: You write the following code. public delegate void FaxDocs(object sender, FaxArgs args); You need to create an event that will invoke FaxDocs. Which code segment should you use?

    A
    public class FaxArgs : EventArgs {
    private string coverPageInfo;
    public FaxArgs(string coverInfo) {
    this.coverPageInfo = coverPageInfo;
    }
    public string CoverPageInformation {
    get {return this.coverPageInfo;}
    }
    }

    B
    public static event Fax FaxDocs;

    C
    public class FaxArgs : EventArgs {
    private string coverPageInfo;
    public string CoverPageInformation {
    get {return this.coverPageInfo;}
    "A Composite Solution With Just One Click" - Certification Guaranteed 259 Microsoft 70-536 Exam
    }
    }

    D
    public static event FaxDocs Fax;

    Note: Not available
    1. Report
  5. Question: 

    You are creating a class named Age.

    You need to ensure that the Age class is written such that collections of Age objects can be sorted. Which code segment should you use?

    A
    public class Age {
    public int Value;
    public object CompareTo(int iValue) {
    try {
    return Value.CompareTo(iValue); }
    catch {

    throw new ArgumentException ("object not an Age");
    }
    }
    }

    B
    public class Age { public int Value;
    public object CompareTo(object obj) {
    if (obj is Age) {
    Age _age = (Age) obj;
    return Value.CompareTo(obj);
    }
    throw new ArgumentException("object not an Age");
    }
    }

    C
    public class Age : IComparable {
    public int Value;
    public int CompareTo(object obj) { if (obj is Age) {
    Age _age = (Age) obj;
    return Value.CompareTo(_age.Value);
    }
    throw new ArgumentException("object not an Age");
    "A Composite Solution With Just One Click" - Certification Guaranteed 260 Microsoft 70-536 Exam
    }
    }

    D
    public class Age : IComparable {
    public int Value;
    public int CompareTo(object obj) {
    try {
    return Value.CompareTo(((Age) obj).Value);
    } catch {
    return -1;
    }
    }
    }

    Note: Not available
    1. Report
  6. Question: 

    You are creating a class that performs complex financial calculations.

    The class contains a method named GetCurrentRate that retrieves the current interest rate and a variable named currRate that stores the current interest rate.

    You write serialized representations of the class. You need to write a code segment that updates the currRate variable with the current interest rate when an instance of the class is deserialized. Which code segment should you use?

    A
    [OnDeserializing]
    void UpdateValue(SerializationInfo= info) {
    info->AddValue("currentRate", GetCurrentRate());
    }

    B
    [OnSerializing]
    void UpdateValue (StreamingContext= context) {
    currRate = GetCurrentRate();
    }

    C
    [OnDeserialized]
    void UpdateValue(StreamingContext= context) {
    currRate = GetCurrentRate();
    }

    D
    [OnSerializing]
    void UpdateValue(SerializationInfo= info) {
    info->AddValue("currentRate", GetCurrentRate());
    }
    "A Composite Solution With Just One Click" - Certification Guaranteed 261 Microsoft 70-536 Exam

    Note: Not available
    1. Report
  7. 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?

    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);

    Note: Not available
    1. Report
  8. Question: You are developing a class library. Portions of your code need to access system environment variables. You need to force a runtime SecurityException only when callers that are higher in the call stack do not have the necessary permissions. Which call method should you use?

    A
    set.Demand();

    B
    set.Deny();

    C
    set.Assert();

    D
    set.PermitOnly();

    Note: Not available
    1. Report
  9. Question: 

    You write the following custom exception class named CustomException.

    public ref class CustomException : ApplicationException

    {

    public:

    literal int COR_E_ARGUMENT = (int)0x80070057;

    CustomException(String= msg) : ApplicationException(msg)

    {

    HResult = COR_E_ARGUMENT;

    }

    };

    You need to write a code segment that will use the CustomException class to immediately return control to the COM caller. You also need to ensure that the caller has access to the error code.

    Which code segment should you use?

    A
    return Marshal::GetExceptionForHR(
    CustomException::COR_E_ARGUMENT);

    B
    Versireturn CustomException::COR_E_ARGUMENT;

    C
    Marshal::ThrowExceptionForHR(
    CustomException::COR_E_ARGUMENT);

    D
    throw gcnew CustomException("Argument is out of bounds"); "A Composite Solution With Just One Click" - Certification Guaranteed 263 Microsoft 70-536 Exam

    Note: Not available
    1. Report
  10. Question: 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 ref class Person : public IComparable<String=>{ public : virtual Boolean CompareTo(String= other){
    ...
    }
    }

    B
    public ref class Person : public IComparable<String=>{ public : virtual Int32 CompareTo(Object= other){
    ...
    }
    }

    C
    public ref class Person : public IComparable<String=>{ public : virtual Int32 CompareTo(String= other){
    ...
    }
    }

    D
    public ref class Person : public IComparable<String=>{ public : virtual Boolean CompareTo(Object= other){
    ...
    }
    }

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd