Re: Using a namespace between 2 partial classes by Peter
Peter
Fri May 09 12:28:25 CDT 2008
On Fri, 09 May 2008 03:50:00 -0700, <Peted> wrote:
> im using c# vs2008
>
> is it possible to define two partial classes in two different named
> code modules in this case the class and its attched designer class,
> and have a using statement at the top of the main class that allows
> access to a 3rd class/control/dll etc etc
>
> if i have the using statment at the top of the main class is it
> possible to have that using statement used in a partial class there,
> and have the using statment propogate through to the partial class in
> the designer code that is auto generated, so that referenced objects
> can also be called by code in the designer
If I understand your question correctly, the answer is "no". The "using"
directive applies only to the code file being compiled.
If you can explain more specifically how it is you'd think the
Designer-generated code file would use your other assembly reference, it's
possible that someone could come up with a different idea for solving
whatever problem you're trying to address. For example, how is it that
you'd expect the Designer-generated code file to even be aware of this
other assembly? What action in the Designer would you take that would
cause the Designer-generated code to use the other assembly?
Pete