日期:2014-05-18 浏览次数:21015 次
public class A
{
    public B inner = null;
    public A(B other)
    {
        inner = other;
        other.inner = this;
    }
    public A()//也需要一个无参的
    {
    }
}
public clBss B
{
    public A inner = null;
    public B(A other)
    {
        inner = other;
        other.inner = this;
    }
    public B()//也需要一个无参的
    {
    }
}
使用
A o1 = new A();
B o2 = new B(o1);
------解决方案--------------------
使用静态c ,实例化应该有点问题吧,只能是c来做数据传递? 如果静态c ,a和b能主动拿数据