CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2002
    Location
    Germany
    Posts
    6,205

    Question Have you faced namespace problems?

    Hi,

    I have faced a strange namespace problem with my control being developed in C#.

    My Control Namespace was: xxx.yyyy.zzzz and the control class was zzzz.

    Things were fine until I decided to expose some events from the control. This is when I was faced with a resource non-availability exception.

    The problem was solved when the namespace was cut short to only zzzz.

    Now, the component is at zzzz.zzzz, the former being the namespace and the latter being the class name.

    Now, there is a new problem. If I use "using zzzz" directive at the client, the control is not persisted by the workspace.

    Have any of you found errors of this sort?

    If so, please share your experience.

    Thanks and regards,
    Siddhartha

  2. #2
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    summary
    the moral of the story is don't put the class name same as your current namespace.

    for instance

    namespace x.y.z
    so
    recommendation would be don't keep z as the class name ...

    Paresh

  3. #3
    Join Date
    Oct 2002
    Location
    Germany
    Posts
    6,205
    Not exactly so.

    We have faced the same problem even when the class name has NOT been the same as namespace name.

    The problem comes in when the control wraps over an existing control (say web browser), and has a long namespace which may or may not match the class name.

  4. #4
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    could you give an example which is giving such a problem.

    PAresh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured