General information
Category:
Coding, syntax and commands
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only