R
R.Balaji
Hi,
I have declared two interfaces like this
//interface.cs
namespace test
{
interface IInterface1
{
IInterface2 getItem();
}
interface IInterface2
{
IInterface1 getItem();
}
}
I create a dll with this interface.
Now I create two project files.
One implements IInterface1 and the other implements IInterface2
//refer interface.dll
//class1.csproj
//class1.cs
using test;
public class class1 : IInterface1
{
IInterface2 getItem()
{
class2 a = new class2();
return a;
}
}
//refer interface.dll
//class2.csproj
//class2.cs
using test;
public class class2: IInterface2
{
IInterface1 getItem()
{
class1 b = new class1();
return b;
}
}
Now I couldn't compile class1, as it doesn't have reference of class2.
Also I couldn't compile class2, as it doesn't have reference of class1.
What should I do?
Thanks.
Regards,
R.Balaji
I have declared two interfaces like this
//interface.cs
namespace test
{
interface IInterface1
{
IInterface2 getItem();
}
interface IInterface2
{
IInterface1 getItem();
}
}
I create a dll with this interface.
Now I create two project files.
One implements IInterface1 and the other implements IInterface2
//refer interface.dll
//class1.csproj
//class1.cs
using test;
public class class1 : IInterface1
{
IInterface2 getItem()
{
class2 a = new class2();
return a;
}
}
//refer interface.dll
//class2.csproj
//class2.cs
using test;
public class class2: IInterface2
{
IInterface1 getItem()
{
class1 b = new class1();
return b;
}
}
Now I couldn't compile class1, as it doesn't have reference of class2.
Also I couldn't compile class2, as it doesn't have reference of class1.
What should I do?
Thanks.
Regards,
R.Balaji