1. Question: How will you count the odd numbers from the array shown below using LINQ in .Net framework 4.0? int[]numbers={5,4,1,3,9,8,6,7,2,0};

    A
    int findoddNumbers = numbers.Count(n => n % 2 == 1);

    B
    int findoddNumbers = numbers.Count( n % 2 == 1);

    C
    int findoddNumbers = (from number in numbers where numbers%2==1 select Count());

    D
    int findoddNumbers = (from number in numbers where number%2==1 select numbers).Count();

    Note: Not available
    1. Report
  2. Question: How do you add MetaDescription to your web page in .Net framework 4.0?

    A
    HtmlMeta meta2 = new HtmlMeta(); meta2.Name = "description"; meta2.Content = "add meta description"; Page.Header.Controls.Add(HtmlMeta );

    B
    Page.MetaDescription

    C
    All of these are correct

    D
    None of these are correct

    Note: Not available
    1. Report
  3. Question: Consider the following code snippet:
    namespace ExtensionMethods
    {
    public static class NumericExtensionMethods
    {
      public static bool IsNumeric(this string s)
      {
        float output;
        return float.TryParse(s, out output);
      }
    }
    }
    After adding the namespace, how will you call the ExtensionMethod on the string if your string variable is defined as: string test="4";

    A
    test.IsNumeric();

    B
    ExtensionMethods.NumericExtensionMethods.IsNumeric();

    C
    NumericExtensionMethods m = new NumericExtensionMethods(); m.IsNumeric(test);

    D
    None of these

    Note: Not available
    1. Report
  4. Question: What is the purpose of the System.Windows.Data namespace in .Net framework 4.0?

    A
    Using System.Windows.Data namespace, you can integrate rich media, including drawings, text, and audio/video content in Windows Presentation Foundation applications.

    B
    It contains classes used for binding properties to data sources, data source provider classes, and data-specific implementations of collections and views.

    C
    It provides the types that support navigation, including navigating between windows and navigation journaling.

    D
    It contains classes for creating windows-based applications that take full advantage of the rich user interface features available in the Microsoft Windows operating system.

    Note: Not available
    1. Report
  5. Question: Suppose you want to eliminate duplicate elements from the array int[] source = { 7, 4, 1, 3, 9, 8, 6, 7, 2, 1, 8, 15, 8, 23} and sort the elements in descending order using LINQ in .Net framework 4.0. Which of the following statements can you use?

    A
    var result = (from s in source orderby s select distinct s).Descending();

    B
    var result = (from s in source orderby s descending select s).Distinct();

    C
    var result = select distinct s from s in source sortby s descending;

    D
    var result = from s in source orderby s descending group p by s select s;

    Note: Not available
    1. Report
  6. Question: Which of the following classes of System.Windows.Media namespace provides rendering support in WPF which includes hit testing, coordinate transformation, and bounding box calculations in .Net framework 4.0?

    A
    HitTestResult

    B
    Visual

    C
    Colors

    D
    Brush

    Note: Not available
    1. Report
  7. Question: Which of the following statements is correct for ASP.NET MVC Routing in .Net Framework 4.0?

    A
    It is used to match the incoming requests and to map them to a controller action.

    B
    It is used to construct the outgoing URLs which correspond to controller actions.

    C
    Both are correct

    Note: Not available
    1. Report
  8. Question: Which of the following is NOT a valid data source control in .Net framework 4.0?

    A
    LinqDataSource

    B
    XmlDataSource

    C
    AccessDataSource

    D
    EntityDataSource

    E
    All of these are valid data sources

    Note: Not available
    1. Report
  9. Question: Which of the following statements is correct for WSHttpBinding of WCF in .Net framework 4.0?

    A
    It is a secure and interoperable binding that is suitable for non-duplex service contracts.

    B
    It is a secure and interoperable binding that is suitable for duplex service contracts or communication through SOAP intermediaries.

    C
    It is a secure and optimized binding suitable for cross-machine communication between WCF applications.

    D
    It is a queued binding that is suitable for cross-machine communication between WCF applications.

    Note: Not available
    1. Report
  10. Question: What result will you get when you run the following LINQ query in .Net framework 4.0?
    var scoreRecords = new[] { new {Name = "Alice", Score = 50},
        new {Name = "Bob" , Score = 40},
        new {Name = "Cathy", Score = 45}
    };
    var scoreRecordsDict = scoreRecords.ToDictionary(sr =>sr.Name);
    Response.Write(scoreRecordsDict["Bob"]);

    A
    { Name = Bob}

    B
    { Name = Bob, Score = 40 }

    C
    Name = Bob

    D
    None of thses

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