【发布时间】:2022-09-23 16:57:42
【问题描述】:
我想在这些条件下将ButtonDisabled 属性设置为false:
至少一个后缀为_Set1 的属性为真,至少一个后缀为_Set2 的属性为true。当条件不再满足时,将ButtonDisabled 属性设置为true
一个想法如何做到这一点?
public bool CheckBox1_Set1 { get; set; }
public bool CheckBox2_Set1 { get; set; }
public bool CheckBox3_Set1 { get; set; }
public bool CheckBox1_Set2 { get; set; }
public bool CheckBox2_Set2 { get; set; }
public bool CheckBox3_Set2 { get; set; }
public bool ButtonDisabled { get; set; }
-
你想要_____吗放
ButtonDisabled\ 的后备字段的值,或者您是否希望ButtonDisabled成为当其他属性/成员满足某些条件时返回false的计算属性(没有后备字段)?