Namespace reference into a variable - whats the syntax

Posted on 2005-05-12
Last Modified: 2010-04-07
I'd like to use:


instead of:


what is the syntax for assinging the Img variable to be a reference to the System.Web.UI.WebControls.Image namespace?

Question by:brooklynDev
    LVL 23

    Accepted Solution

    only in C#

    using Img = System.Web.UI.WebControls.Image;
    LVL 23

    Expert Comment

    Not possible in VB.NET

    'Tis but just another shortcoming of VB.NET
    LVL 23

    Expert Comment

    wherein in C#

    Img myImage = new Img();

    Featured Post

    Courses: Start Training Online With Pros, Today

    Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

    Join & Write a Comment

    Suggested Solutions

    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now