Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datasets and namepaces
Message
From
02/07/2011 08:54:07
 
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01517067
Message ID:
01517143
Views:
28
Thanks for your answer, Viv.

Project A has namespace and B has namespace B.
Project C, which both call, has namespace C.
That works well for a lot of other reasons.

That setup works, as long as C never has to see the actual datasets that A and B are using and vice versa. That is usually the case, where C accepts or returns regular types.
There is only instance where C needed to see that actual dataset, so I punted and removed that class from C and put a copy of it in both A and B.
Duplicate code is a major no-no for me, but now and then it's the best answer.

I'm still wondering, tho, if it's possible to get namespacea.datasetds information into namespaceb.datasetds without copying it table by table, row by row.







>>If it worked when everything was in one project then it should still work if you use the same namespace for all three projects.

If you do need different namespaces for each assembly then:
Add a reference to ProjectA in ProjectC and, in Project C, refer to the ProjectA Dataset using it's fully qualified namespace.

But, in either of the above cases, if you have a situation where currently two assemblies would need to reference *each other* then you have no real alternative but to factor out the classes that both assemblies share into a third assembly which they both can reference. Again there is no reason why classes in the new, third assembly should not retain the same namespaces.
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform