Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datasets and namepaces
Message
From
02/07/2011 04:11:01
 
 
To
01/07/2011 12:30:16
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01517067
Message ID:
01517138
Views:
34
>I'm breaking a large app into projects and have come across a problem
>Applications in project A and B pass dataset DS as an argument to a parameter in a function in project C.
>
>All three projects have their own DS.
>
>That worked fine when they were all in one project, but when I pass the dataset DS from project A to project C, there are different namespaces and I get a message saying that the dataset can't be converted.
>
>For a lot of reasons, I'd like to keep each project with its own DS.
>
>I can actully copy the data to DS for project C before calling the function and pass that as the argument but that seems kludgy.
>How best to handle the conversions so that project see sees the data from A and B?

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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform