Namespace problem


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Namespace problem

  1. #1
    Frank Oquendo Guest

    Namespace problem

    I have a collection of classes that deal with images. Naturally, I wanted to
    call my namespace Graphics or Imaging. Apparently, these names are reserved.
    Whenever I try to compile my DLL, I get an internal compiler error. The only
    way to solve the problem is to change the name to something else.

    Are there any more of these reserved names? If so, where can I read about
    them?

    --
    There are 10 kinds of people:
    Those who understand binary and those who don't
    http://www.acadx.com
    http://vbxtender.sourceforge.net



  2. #2
    Frank Oquendo Guest

    Re: Namespace problem

    Followup: it gets weirder. I can't use Imaging or Graphics *anywhere* in my
    namespace. I tried ImagingTools and GraphicTools but got the same error
    message.

    --
    There are 10 kinds of people:
    Those who understand binary and those who don't
    http://www.acadx.com
    http://vbxtender.sourceforge.net



  3. #3
    Patrick Steele [MVP] Guest

    Re: Namespace problem

    In article <3d69bdea$1@10.1.10.29> (from Frank Oquendo
    <nospam@please.com>),
    > I have a collection of classes that deal with images. Naturally, I wanted to
    > call my namespace Graphics or Imaging. Apparently, these names are reserved.
    > Whenever I try to compile my DLL, I get an internal compiler error. The only
    > way to solve the problem is to change the name to something else.


    I just did a quick console app using the "Graphics" namespace and it
    compiled without problems:

    using System;
    using System.Drawing;

    namespace Graphics
    {
    class MainClass
    {
    public static void Main(string[] args)
    {
    Console.WriteLine("Hello World!");
    }
    }
    }

    You may be seeing a conflict between the System.Drawing.Graphics class
    and your "Graphics" namespace. Can you provide some more info?

    --
    Patrick Steele
    Microsoft .NET MVP
    http://radio.weblogs.com/0110109

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center