external references in assemblies?

W

wASP

Hi all,

I'm trying to pull two different classes out of a single webfile (*.aspx)
and compile them separately for a library/assembly. The problem is that
each class references each other, and the compiler doesn't like that:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
sysobj.cs(171,20): error CS0246: The type or namespace name 'dynamic_control_creation'
could not be found (are you missing a using directive or an assembly reference?)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


How can I make external references in C# for each class to the other?

(DAMN - I wish C# had a linker.)


THANKS!!!

- wASP
 
G

Guest

Hi wASP,
you will need to pull the common functionality that the two classes
reference in one another into a third DLL which will get built first, then
the other DLLs can reference that one and you will not have cyclical
references.


Mark R Dawson
http://www.markdawson.org
 
W

wASP

Hi wASP,
you will need to pull the common functionality that the two classes
reference in one another into a third DLL which will get built first, then
the other DLLs can reference that one and you will not have cyclical
references.

Hi wASP,
you will need to pull the common functionality that the two classes
reference in one another into a third DLL which will get built first, then
the other DLLs can reference that one and you will not have cyclical
references.


Hi Mark!

I'm not sure as to how to do this - I'm new to ASP.NET.

The situation is like this:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// sysobj.cs
public class sys_obj_page : Page
{
public class sys_obj_class
{
// code ...

private dynamic_control_creation dyn_ctrl_crtn_obj;
public dynamic_control_creation Get_dyn_ctrl_crtn_obj
{ get { return dyn_ctrl_crtn_obj; } }

// more code ...
}
}

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// dynctrl.cs
public class dyn_ctrl_page : Page
{
public class dynamic_control_creation
{
private sys_obj_class sys_obj;

// more code ...
}
}
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

A reference to a dynamic_control_creation object is stored in a sys_obj_class object,
and I need to tell the compiler that it's an external reference.

I don't know much about attributes, so maybe that would have the answer.

I suppose that I could use a void ref instead of the dynamic_control_creation
object ref, then cast it when I need to - but I would think that there would be
a more elegant solution.

- wASP
 

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