1. Question: You are developing a method that searches a string for a substring. The method will be localized to Italy.
    Your method accepts the following parameters:
    The string to be searched, which is named searchList
    The string for which to search, which is named searchValue
    You need to write the code.
    Which code segment should you use?

    A
    CompareInfo comparer =
    new CultureInfo("it-IT").CompareInfo;
    if (comparer.IndexOf(searchList,
    searchValue) > 0) {
    return true;
    } else {
    return false;
    }

    B
    CultureInfo comparer = new CultureInfo("it-IT");
     if (searchList.IndexOf(searchValue)
    > 0) {
    return true;
    } else {
    return false;
    }

    C
    CompareInfo comparer =
    new CultureInfo("it-IT").CompareInfo;
    return comparer.Compare(searchList, searchValue);

    D
    return searchList.IndexOf(searchValue);

    Note: Not available
    1. Report
  2. 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
    public ref class MyDictionary : public IDictionary{};

    B
    public ref class MyDictionary : public Dictionary<String=, String=>{};

    C
    public ref class MyDictionary : public Hashtable{};

    D
    public ref class MyDictionary{};
    Dictionary<String=, String=> t = gcnew Dictionary<String=, String=>(); MyDictionary dictionary = (MyDictionary)t;

    Note: Not available
    1. Report
  3. 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(Of String) interface. Which code segment should you use?

    A
    Public Class Person
    Implements IComparable(Of String)
    Public Function CompareTo(ByVal other As String) _
    As Boolean Implements IComparable(Of String).
    CompareTo
    ...
    End Function
    End Class

    B
    Public Class Person
    Implements IComparable(Of String)
    Public Function CompareTo(ByVal other As String) As _ Integer Implements IComparable(Of String).
    CompareTo
    ...
    End Function
    End Class

    C
    Public Class Person
    Implements IComparable(Of String)
    Public Function CompareTo(ByVal other As Object) _
    As Boolean Implements IComparable(Of String).CompareTo
    ...
    End Function
    End Class

    D
    Public Class Person
    Implements IComparable(Of String)
    Public Function CompareTo(ByVal other As Object) As _ Integer Implements IComparable(Of String).
    CompareTo
    ...
    End Function
    End Class

    Note: Not available
    1. Report
  4. Question: You are creating a new security policy for an application domain. You write the following lines of code.
    PolicyLevel policy = PolicyLevel.CreateAppDomainLevel();
    PolicyStatement noTrustStatement =
    new PolicyStatement(
    policy.GetNamedPermissionSet("Nothing"));
    PolicyStatement fullTrustStatement =
    new PolicyStatement(
    policy.GetNamedPermissionSet("FullTrust"));
    You need to arrange code groups for the policy so that loaded assemblies default to the Nothing permission set. If the assembly originates from a trusted zone, the security policy must grant the assembly the FullTrust permission set.
    Which code segment should you use?

    A
    CodeGroup group1 = new FirstMatchCodeGroup(
    new AllMembershipCondition(),
    noTrustStatement); CodeGroup group2 = new UnionCodeGroup(
    new ZoneMembershipCondition(SecurityZone.Trusted),
     fullTrustStatement);
    group1.AddChild(group2);

    B
    CodeGroup group = new FirstMatchCodeGroup(
    new AllMembershipCondition(),
    noTrustStatement);

    C
    CodeGroup group = new UnionCodeGroup(
    new ZoneMembershipCondition(SecurityZone.Trusted),
    fullTrustStatement);

    D
    CodeGroup group1 = new FirstMatchCodeGroup(
    new ZoneMembershipCondition(SecurityZone.Trusted),
    fullTrustStatement);
    CodeGroup group2 = new UnionCoderoup(
    new AllMembershipCondition(),
    noTrustStatement);
    group1.AddChild(group2);

    Note: Not available
    1. Report
  5. 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 = gcnew SslStream(Client->GetStream()); ssl->AuthenticateAsServer(certificate, false, SslProtocols::None, true);

    B
    SslStream =ssl = gcnew SslStream(Client->GetStream()); ssl->AuthenticateAsServer(certificate, false, SslProtocols::Tls, true);

    C
    SslStream =ssl = gcnew SslStream(Client->GetStream()); ssl->AuthenticateAsServer(certificate, false, SslProtocols::Ssl3, true);

    D
    SslStream =ssl = gcnew SslStream(Client->GetStream()); ssl->AuthenticateAsServer(certificate, false, SslProtocols::Ssl2, true);

    Note: Not available
    1. Report
  6. Question: You are developing a method that searches a string for a substring. The method will be localized to Italy.
    Your method accepts the following parameters:
    The string to be searched, which is named searchList
    The string for which to search, which is named searchValue
    You need to write the code.
    Which code segment should you use?

    A
    CompareInfo= comparer =
    gcnew CultureInfo("it-IT")::CompareInfo;
    return comparer->Compare(searchList, searchValue);

    B
    CompareInfo= comparer =
    gcnew CultureInfo("it-IT")::CompareInfo;
    if (comparer->IndexOf(searchList,
    searchValue) > 0) {
    return true;
    "A Composite Solution With Just One Click" - Certification Guaranteed 303 Microsoft 70-536 Exam
    } else {
    return false;
    }

    C
    CultureInfo= comparer = gcnew CultureInfo("it-IT");
    if (searchList->IndexOf(searchValue)
    > 0) {
    return true;
    } else {
    return false;
    }

    D
    return searchList->IndexOf(searchValue);

    Note: Not available
    1. Report
  7. Question: You write the following custom exception class named CustomException.
    public class CustomException : ApplicationException {
    public static int COR_E_ARGUMENT =
    unchecked((int)0x80070057);
    public CustomException(string msg) : base(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 CustomException.COR_E_ARGUMENT;

    B
    throw new CustomException("Argument is out of bounds");

    C
    Marshal.ThrowExceptionForHR(
    CustomException.COR_E_ARGUMENT);

    D
    return Marshal.GetExceptionForHR(
    CustomException.COR_E_ARGUMENT);
    "A Composite Solution With Just One Click" - Certification Guaranteed 304 Microsoft 70-536 Exam

    Note: Not available
    1. Report
  8. 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 ref class Employee {
    02.
    03. public :
    04. String= Name;
    05. };
    06.
    07. public ref class Manager : public Employee {
    08.
    09. public :
    10. int Level;
    11. };
    12.
    13. public ref class Group {
    14.
    15. public :
    16. array<Employee=>= Employees;
    17. };
    You create an instance of the Group class. You populate the fields of the instance. When you attempt to serialize the instance by using the Serialize method of the XmlSerializer class, you receive InvalidOperationException. You also receive the following error message: "There was an error generating the XML document."
    You need to modify the code segment so that you can successfully serialize instances of the Group class by using the XmlSerializer class. You also need to ensure that the XML output contains an element for all public fields in the class hierarchy.
    What should you do?

    A
    Insert the following code between lines 14 and 15 of the code segment: [XmlArray(ElementName="Employees")]

    B
    Insert the following code between lines 3 and 4 of the code segment:
    [XmlElement(Type = __typeof(Employee))]
    and
    Insert the following code segment between lines 8 and 9 of the code segment:
    [XmlElement(Type = __typeof(Manager))]

    C
    Insert the following code between lines 14 and 15 of the code segment:
    [XmlArrayItem(Type = __typeof(Employee))]
    [XmlArrayItem(Type = __typeof(Manager))]

    D
    Insert the following code between lines 14 and 15 of the code segment:
    [XmlElement(Type = __typeof(Employees))]

    Note: Not available
    1. Report
  9. Question: You are writing a method to compress an array of bytes. The bytes to be compressed are passed to the method in a parameter named document. You need to compress the contents of the incoming parameter. Which code segment should you use?

    A
    MemoryStream outStream = new MemoryStream();
    GZipStream zipStream = new GZipStream(outStream,
    CompressionMode.Compress);
    zipStream.Write(document, 0, document.Length);
    zipStream.Close();
    return outStream.ToArray();

    B
    MemoryStream inStream = new MemoryStream(document);
    GZipStream zipStream = new GZipStream(inStream,
    CompressionMode.Compress);
    byte[] result = new byte[document.Length];
    zipStream.Write(result, 0, result.Length);
    return result;

    C
    MemoryStream stream = new MemoryStream(document);
    GZipStream zipStream = new GZipStream(stream,
    CompressionMode.Compress);
    "A Composite Solution With Just One Click" - Certification Guaranteed 306 Microsoft 70-536 Exam
    zipStream.Write(document, 0, document.Length);
    zipStream.Close();
    return stream.ToArray();

    D
    MemoryStream inStream = new MemoryStream(document);
    GZipStream zipStream = new GZipStream(inStream,
    CompressionMode.Compress);
    MemoryStream outStream = new MemoryStream();
    int b;
    while ((b = zipStream.ReadByte()) != -1) {
    outStream.WriteByte((byte)b);
    }
    return outStream.ToArray();

    Note: Not available
    1. Report
  10. Question: You create the definition for a Vehicle class by using the following code segment. public ref class Vehicle { public : [XmlAttribute(AttributeName = "category")] String= vehicleType; String= model; [XmlIgnore] int year; [XmlElement(ElementName = "mileage")] int miles; ConditionType condition; Vehicle() {} enum ConditionType { [XmlEnum("Poor")] BelowAverage, [XmlEnum("Good")] Average, [XmlEnum("Excellent")] AboveAverage } }; You create an instance of the Vehicle class. You populate the public fields of the Vehicle class instance as shown in the following table: You need to identify the XML block that is produced when this Vehicle class instance is serialized. Which block of XML represents the output of serializing the Vehicle instance?

    A
    <br />xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" <br />category="car"> <br />racer <br />15000 <br />Excellent

    B
    <br />xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" "A Composite Solution With Just One Click"- <br />Certification Guaranteed 251 Microsoft 70-536 Exam <br />xmlns:xsd="http://www.w3.org/2001/XMLSchema"" <br />vehicleType="car"> <br />racer <br />15000 <br />AboveAverage

    C
    <br />xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/ XMLSchema" <br />class="car"> <br />racer <br />15000 <br />Excellent

    D
    <br />xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/ XMLSchema"> <br />car <br />racer <br />15000 <br />Excellent

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