1. Question: 

    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
    RectangleF rectangle = new RectangleF(10f, 10f, 450f, 25f); SolidBrush rectangleBrush =
    new SolidBrush(Color.AliceBlue);
    Pen rectanglePen = new Pen(rectangleBrush);
    Graphics g = this.CreateGraphics();

    B
    DrawRectangle(rectangleBrush, rectangle);

    C
    Rectangle rectangle = new Rectangle(10, 10, 450, 25); LinearGradientBrush rectangleBrush =
    new LinearGradientBrush(rectangle,
    Color.AliceBlue,
    Color.CornflowerBlue,
    LinearGradientMode.ForwardDiagonal);
    Pen rectanglePen = new Pen(rectangleBrush);
    Graphics g = this.CreateGraphics();

    D
    DrawRectangle(rectanglePen, rectangle);

    E
    RectangleF rectangle = new RectangleF(10f, 10f, 450f, 25f); Point[] points = new Point[]
    {new Point(0,
    0),
    new Point(110, 145)};
    LinearGradientBrush rectangleBrush =
    new LinearGradientBrush(rectangle, Color.AliceBlue,
    Color.CornflowerBlue,
    LinearGradientMode.ForwardDiagonal);
    Pen rectanglePen = new Pen(rectangleBrush);
    Graphics g = this.CreateGraphics();

    F
    DrawPolygon(rectanglePen, points);

    G
    Rectangle rectangle = new Rectangle(10, 10, 450, 25); LinearGradientBrush rectangleBrush =
    new LinearGradientBrush(rectangle, Color.AliceBlue, Color.CornflowerBlue,
    "A Composite Solution With Just One Click" - Certification Guaranteed 289 Microsoft 70-536 Exam LinearGradientMode.ForwardDiagonal);
    Pen rectanglePen = new Pen(rectangleBrush);
    Graphics g = this.CreateGraphics();

    H
    FillRectangle(rectangleBrush, rectangle);

    Note: Not available
    1. Report
  2. Question: 

    You are writing an application that uses SOAP to exchange data with other applications. You use a Department class that inherits from ArrayList to send objects to another application. The Department object is named dept.

    You need to ensure that the application serializes the Department object for transport by using SOAP.

    Which code should you use?

    A
    SoapFormatter= formatter = gcnew SoapFormatter();
    array= buffer = gcnew array(dept->Capacity);
    MemoryStream= stream = gcnew
    MemoryStream(buffer);
    for each (Object= o in dept) {
    formatter->Serialize(stream, o);
    }

    B
    SoapFormatter= formatter = gcnew SoapFormatter();
    MemoryStream= stream = gcnew MemoryStream();
    for each (Object= o in dept) {
    formatter->Serialize(stream, o);
    }

    C
    SoapFormatter= formatter = gcnew SoapFormatter();
    array= buffer = gcnew array(dept->Capacity);
    MemoryStream= stream = gcnew
    MemoryStream(buffer);
    formatter->Serialize(stream, dept);

    D
    SoapFormatter= formatter = gcnew SoapFormatter();
    MemoryStream= stream = gcnew MemoryStream();
    formatter->Serialize(stream, dept);

    Note: Not available
    1. Report
  3. Question: You need to read the entire contents of a file named Message.txt into a single string variable. Which code segment should you use?

    A
    string result = null;
    StreamReader reader = new StreamReader("Message.txt"); result = reader.ReadLine();

    B
    string result = string.Empty;
    StreamReader reader = new StreamReader("Message.txt"); while (!reader.EndOfStream) {
    result += reader.ToString();
    }

    C
    string result = null;
    StreamReader reader = new StreamReader("Message.txt"); result = reader.Read().ToString();

    D
    string result = null;
    StreamReader reader = new StreamReader("Message.txt"); result = reader.ReadToEnd();

    Note: Not available
    1. Report
  4. 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
    CultureInfo= culture = gcnew CultureInfo(\"es-MX\", false); DateTimeFormatInfo= dtfi = culture->DateTimeFormat;
    DateTime= dt = gcnew DateTime(DateTime::Today::Year, DateTime::Today::Month, DateTime::Today:: Day);
    String= dateString = dt->ToString(dtfi->LongDatePattern);

    B
    String= dateString = DateTimeFormatInfo::CurrentInfo
    ::GetMonthName(DateTime::Today::Month);
    String= dateString = DateTime::Today::Month::ToString(\"es-MX\");

    C
    Calendar= cal = gcnew CultureInfo(\"es-MX\", false)::Calendar; DateTime= dt = gcnew DateTime (DateTime::Today::Year, DateTime::Today::Month, DateTime::Today::Day);
    String= dateString = dt->ToString();

    Note: Not available
    1. Report
  5. 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 class Person : IComparable<string>{
    public int CompareTo(string other){
     ...
    }
    }

    B
    public class Person : IComparable<string>{ public bool CompareTo(string other){
    ...
    "A Composite Solution With Just One Click" - Certification Guaranteed 293 Microsoft 70-536 Exam
    }
    }

    C
    public class Person : IComparable<string>{
    public bool CompareTo(object other){
     ...
    }
    }

    D
    public class Person : IComparable<string>{
    public int CompareTo(object other){
     ...
    }
    }

    Note: Not available
    1. Report
  6. Question: You are writing a custom dictionary. The custom-dictionary class is named MyDictionary. You need to ensure that the dictionary is type safe. Which code segment should you use?

    A
    class MyDictionary : IDictionary

    B
    class MyDictionary { ... }
    Dictionary<string, string> t =
    new Dictionary<string, string>();
    MyDictionary dictionary = (MyDictionary)t;

    C
    class MyDictionary : Dictionary<string, string>

    D
    class MyDictionary : HashTable

    Note: Not available
    1. Report
  7. Question: You write the following code segment to call a function from the Win32 Application Programming Interface (API) by using platform invoke.
    string personName = "N?el";
    string msg = "Welcome " + personName + " to club ''!";
    bool rc = User32API.MessageBox(0, msg, personName, 0);
    You need to define a method prototype that can best marshal the string data.
    Which code segment should you use?

    A
    [DllImport("user32", CharSet = CharSet.Ansi)]
    public static extern bool MessageBox(int hWnd,
    String text,
    String caption,
    uint type);}

    B
    [DllImport("user32", CharSet = CharSet.Unicode)]
    public static extern bool MessageBox(int hWnd
    String text,
     String caption,
    uint type);
    }

    C
    [DllImport("user32", EntryPoint = "MessageBoxA",
    CharSet = CharSet.Ansi)]
    public static extern bool MessageBox(int hWnd,
    [MarshalAs(UnmanagedType.LPWStr)]String text,
     [MarshalAs(UnmanagedType.LPWStr)]String caption,
    uint type);}

    D
    [DllImport("user32", EntryPoint = "MessageBoxA",
    CharSet = CharSet.Unicode)]
    public static extern bool MessageBox(int hWnd,
    [MarshalAs(UnmanagedType.LPWStr)]String text,
    [MarshalAs(UnmanagedType.LPWStr)]String caption,
    uint type);
    }

    Note: Not available
    1. Report
  8. Question: 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. "A Composite Solution With Just One Click" - Certification Guaranteed 296 Microsoft 70-536 Exam

    Note: Not available
    1. Report
  9. Question: 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
    TripleDES des = new TripleDESCryptoServiceProvider(); ICryptoTransform crypto = des.
    CreateDecryptor();
    MemoryStream cipherStream = new MemoryStream(cipherMessage); CryptoStream cryptoStream = new CryptoStream(
    cipherStream, crypto, CryptoStreamMode.Read);
    string message;
    message = new StreamReader(cryptoStream).ReadToEnd();

    B
    TripleDES des = new TripleDESCryptoServiceProvider(); ICryptoTransform crypto = des. CreateDecryptor(key, iv); MemoryStream cipherStream = new MemoryStream(cipherMessage);CryptoStream cryptoStream =
    new CryptoStream(
    cipherStream, crypto, CryptoStreamMode.Read);
    string message;
    message = new StreamReader(cryptoStream).ReadToEnd();

    C
    TripleDES des = new TripleDESCryptoServiceProvider();
    des.BlockSize = cipherMessage.Length;
    ICryptoTransform crypto = des.CreateDecryptor(key, iv);
    MemoryStream cipherStream = new MemoryStream(cipherMessage); CryptoStream cryptoStream = new CryptoStream(
    cipherStream, crypto, CryptoStreamMode.Read);
    string message;
    message = new StreamReader(cryptoStream).ReadToEnd(); "A Composite Solution With Just One
    Click" - Certification Guaranteed 297 Microsoft 70-536 Exam

    D
    TripleDES des = new TripleDESCryptoServiceProvider();
    des.FeedbackSize = cipherMessage.Length;
    ICryptoTransform crypto = des.CreateDecryptor(key, iv);
    MemoryStream cipherStream = new MemoryStream(cipherMessage); CryptoStream cryptoStream =
    new CryptoStream(
    cipherStream, crypto, CryptoStreamMode.Read);
    string message;
    message = new StreamReader(cryptoStream).ReadToEnd();

    Note: Not available
    1. Report
  10. Question: You are creating an application that retrieves values from a custom section of the application configuration file. The custom section uses XML as shown in the following block.
    <ProjectSection name="Project1">
    <role name="administrator" />
    <role name="manager" />
    <role name="support" />
    </ProjectSection>
    You need to write a code segment to define a class named Role. You need to ensure that the Role class is initialized with values that are retrieved from the custom section of the configuration file.
    Which code segment should you use?

    A
    public ref class Role : public ConfigurationElement { protected :
    static String= _ElementName = "name";
    public :
    [ConfigurationProperty("role")]
    property
    String= Name { String= get () {return ((String=)base["role"]);}
    }
    };

    B
    public ref class Role : public ConfigurationElement { private :
    "A Composite Solution With Just One Click" - Certification Guaranteed 298 Microsoft 70-536 Exam String= _name;
    protected :
    static String= _ElementName = "name";
    public :
    [ConfigurationProperty("role", IsRequired = true)]
    property String= Name {
    String= get () {return _name;}
    }
    };

    C
    public ref class Role : public ConfigurationElement { private :
    String= _name;
    protected :
    static String= _ElementName = "role";
    public :
    [ConfigurationProperty("name")]
    property String= Name {
    String= get () {return _name;}
    }
    };

    D
    public ref class Role : public ConfigurationElement { protected :
    static String= _ElementName = "role";
    public :
    [ConfigurationProperty("name", IsRequired = true)]
    property String= Name {
    String= get () {return ((String=)base["name"]);}
    }
     };

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