이 포함어떻게 외부에 내부 포함 된 클래스 버블 부울을에 내가 3 개 수업을 클래스
것이 가장 좋은 방법은 C의 foo는에서의 플래그 '사실'을 설정 무엇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.
}
}
?
TIA
몇 가지 코드로 설명을 보여줄 수 있습니까? –
'B'가'A'의 중첩 클래스인지'A'는'B' 타입의 객체인지,'B'와'C' 사이의 관계도 마찬가지입니다. –