Click to See Complete Forum and Search --> : Have you faced namespace problems?


Siddhartha
January 27th, 2003, 02:50 AM
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

pareshgh
January 27th, 2003, 10:07 AM
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

Siddhartha
January 27th, 2003, 09:46 PM
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.

pareshgh
January 28th, 2003, 04:26 AM
could you give an example which is giving such a problem.

PAresh