Using a namespace between 2 partial classes

P

Peted

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


thanks for any insight or help

Peted
 
J

Jon Skeet [C# MVP]

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

I'm having a hard time understanding exactly what you mean (and what
relationship it has to the subject line). Could you give an example?

The designer-generated code shouldn't need any using directives - the
designer should understand and possibly fully-qualify all types it
uses.

Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top