0
类
我有3类:如何泡了一个布尔值,从内包含的类外包含
class A
{
public B b = new B();
public bool flag {get; set;}
}
class B
{
piblic C c = new C();
}
class C
{
public void foo()
{
//iterates a dataTable with column "someBoolCondition"
// I want to set A's bool to true, after the first record that has 'true' in column
//"someBoolCondition". Thus is thought to avoid bool memebers in each class.
}
}
什么是最好的方式设定A的标志为“真”由C的富?
TIA
你能用一些代码来举例说明你的描述吗? –
请粘贴一些代码,不清楚“B”是嵌套类“A”还是“A”包含类型“B”的对象,以及“B”和“C”之间的关系。 –