1. Question: Which of the following define the rules for .NET Languages?

    A
    GAC

    B
    CLS

    C
    CLI

    D
    CTS

    E
    CLR

    F
    JIT

    Note: Not available
    1. Report
  2. Question: What are Satellite assemblies in C# .NET?

    A
    Additional assemblies that are used only by the main C# application

    B
    User control assemblies used by the C# application

    C
    Assemblies that contain only resource information and no code

    D
    Assemblies that contain only code and no resource information

    Note: Not available
    1. Report
  3. Question: The global assembly cache:

    A
    Can store two DLL files with the same name

    B
    Can store two DLL files with the same name, but different versions

    C
    Can store two DLL files with the same name and same version

    D
    Cannot store DLL files with the same name

    Note: Not available
    1. Report
  4. Question: Suppose there is a List of type Person with a property of LastName(string) and PopulateList is a function which returns a Generic List of type Person:
    List<Person> people = PopulateList();
    What does the statement below do?
    people.Sort((x, y) => string.Compare(x.LastName, y.LastName));

    A
    It will return a newly created sorted List.

    B
    It will throw a compiler error.

    C
    It will sort the string in place.

    D
    It will throw InvalidOperationException at runtime.

    Note: Not available
    1. Report
  5. Question: Which of the following will correctly remove duplicates from a List<T>?

    A
    Int32 index = 0; while (index < list.Count + 1) { if (list[index] == list[index + 1]) list.RemoveAt(index); else index--; }

    B
    List<T> withDupes = LoadSomeData(); List<T> noDupes = new List<T>(new HashSet<T>(withDupes)); withDupes.AddRange(noDupes);

    C
    List<T> withDupes = LoadSomeData(); List<T> noDupes = withDupes.Distinct().ToList();

    D
    List<T> withDupes = LoadSomeData(); var hs = new HashSet<T>(withDupes); withDupes.All( x => hs.Add(x) );

    Note: Not available
    1. Report
  6. Question: Is it possible to define custom Exception classes in C#?

    A
    Yes

    B
    Yes, but they have to be derived from System.Exception class

    C
    Yes, but they have to be derived from System.Object class

    D
    No

    Note: Not available
    1. Report
  7. Question: Which type of class members are associated with the class itself rather than the objects of the class?

    A
    Public

    B
    Protected

    C
    Private

    D
    Static

    Note: Not available
    1. Report
  8. Question: What is the syntax required to load and use a normal unmanaged windows DLL (e.g. kernel32.DLL) in a managed .NET C# code?

    A
    Assembly.Load(''Kernel32.DLL'')

    B
    LoadLibrary(''Kernel32.DLL'')

    C
    [DllImport(''kernel32'', SetLastError=true)]

    D
    Unmanaged DLLs cannot be used in a managed .NET application.

    Note: Not available
    1. Report
  9. Question: What is the output of the following code?
    class Test
    {
       static void Main() {
       string myString = “1 2       3  4    5”
       myString = Regex.Replace(myString, @"\s+", " ");
       System.Console.WriteLine(myString);
    }

    A
    12345

    B
    1 2 3 4 5

    C
    54321

    D
    5 4 3 2 1

    Note: Not available
    1. Report
  10. Question: Which of the following will block the current thread for a specified number of milliseconds?

    A
    System.Threading.Thread.Sleep(50);

    B
    System.Threading.Thread.SpinWait(50);

    C
    System.Threading.Thread.Yield();

    D
    None of these.

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