Home / C# Programming / Namespaces :: Discussion

Discussion :: Namespaces

  1. If ListBox is class present in System.Windows.Forms namespace, then which of the following statements are the correct way to create an object of ListBox Class?

    1.   using System.Windows.Forms;
        ListBox lb = new ListBox();
    2.   using LBControl = System.Windows.Forms;   
        LBControl lb = new LBControl();
    3.   System.Windows.Forms.ListBox lb = new  
        zzzSystem.Windows.Forms.ListBox();
    4.   using LBControl lb = new   
        System.Windows.Forms.ListBox;
    5.   using    
        LBContrSystem.Windows.Forms.ListBox;    
        LBControl lb = new LBControl();

  2. A.

    1, 3

    B.

    2, 4, 5

    C.

    1, 3, 5

    D.

    5 only

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    No answer description available for this question.


Be The First To Comment