1. Question: Which of the following is the correct way to define a constant field in the class in term of C#?

    A
    public const int PI=3.145

    B
    public constant int PI=3.145

    C
    public int const PI=3.145

    D
    const public int PI=3.145

    Note: Not available
    1. Report
  2. Question: A class can be marked as static, and can be subclassed.

    A
    True

    B
    False

    Note: Not available
    1. Report
  3. Question: Static field initializes run just before the static constructor is called.

    A
    True

    B
    False

    Note: Not available
    1. Report
  4. Question: Which of the following is the correct deconstructor or finalizer method declaration in the class definition?

    A
    class MyClass{ ~MyClass(){ } }

    B
    class MyClass{ _MyClass(){ } }

    C
    class MyClass{ Finalize(){ } }

    D
    None

    Note: Not available
    1. Report
  5. Question: Partial methods must be void and are implicitly private.

    A
    True

    B
    False

    Note: Not available
    1. Report
  6. Question: A subclass is also called a derived class and a base class is also called a superclass

    A
    True

    B
    False

    Note: Not available
    1. Report
  7. Question: Which class is called super class as the following code fragment?
    public class Asset{
      public string Name;
    
    }
    
    public class Stock : Asset{
      public long SharesOwned;
    }
    
    public class House : Asset{
      public decimal Mortgage;
    
    }

    A
    Asset

    B
    Stock

    C
    House

    D
    Stock and House

    Note: Not available
    1. Report
  8. Question: Which is the correct way to upcasting steps as the following code fragment?
    public class Asset{
      public string Name;
    
    }
    
    public class Stock : Asset{
      public long SharesOwned;
    }
    
    public class House : Asset{
      public decimal Mortgage;
    
    }

    A
    Stock s=new Stock(); Asset a=s;

    B
    Asset a=new Asset(); Stock s=a;

    C
    Stock s=new Stock(); Asset a=s; Stock s=(Stock)a;

    D
    House h=new Stock(); Asset a=h;

    Note: Not available
    1. Report
  9. Question: Which of the following is a value type in C#?

    A
    string

    B
    object

    C
    int

    D
    dynamic

    Note: Not available
    1. Report
  10. Question: What is the size of the float data type in C#?

    A
    2 bytes

    B
    4 bytes

    C
    8 bytes

    D
    16 bytes

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