1. Question: Which of the following is the correct code to close all references to the com objects below?
    Workbooks books = excel.WorkBooks;
    Workbook book = books[1];
    Sheets sheets = book.WorkSheets;
    Worksheet ws = sheets[1];

    A
    Marshal.ReleaseComObject(books);

    B
    Marshal.FinalReleaseComObject(books);

    C
    Marshal.ReleaseComObject(sheets); Marshal.ReleaseComObject(books);

    D
    Marshal.ReleaseComObject(sheet); Marshal.ReleaseComObject(sheets); Marshal.ReleaseComObject(book); Marshal.ReleaseComObject(books);

    Note: Not available
    1. Report
  2. Question: Which of the following is the correct way to sort a C# dictionary by value?

    A
    List<KeyValuePair<string, string>> myList = aDictionary.ToList(); myList.Sort( delegate(KeyValuePair<string, string> firstPair, KeyValuePair<string, string> nextPair) { return firstPair.Value.CompareTo(nextPair.Value); } );

    B
    List<KeyValuePair<string, string>> myList = aDictionary.ToList(); myList.Sort((firstPair,nextPair) => { return firstPair.Value.CompareTo(nextPair.Value); } );

    C
    foreach (KeyValuePair<string,int> item in keywordCounts.OrderBy(key=> key.Value)) { // do something with item.Key and item.Value }

    D
    var ordered = dict.OrderBy(x => x.Value);

    Note: Not available
    1. Report
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
Copyright © 2024. Powered by Intellect Software Ltd