C# UI(CHECKBOX) 轉 2進位/二進位 轉 10進位/十進位
C# UI(CHECKBOX) 轉 2進位/二進位 轉 10進位/十進位
Strlocal_input_state_record_flags = Convert.ToInt32(ckbSub000001_31.Checked).ToString() + Convert.ToInt32(ckbSub000001_30.Checked).ToString() + Convert.ToInt32(ckbSub000001_29.Checked).ToString() + Convert.ToInt32(ckbSub000001_28.Checked).ToString() + Convert.ToInt32(ckbSub000001_27.Checked).ToString() + Convert.ToInt32(ckbSub000001_26.Checked).ToString() + Convert.ToInt32(ckbSub000001_25.Checked).ToString() + Convert.ToInt32(ckbSub000001_24.Checked).ToString() + Convert.ToInt32(ckbSub000001_23.Checked).ToString() + Convert.ToInt32(ckbSub000001_22.Checked).ToString() + Convert.ToInt32(ckbSub000001_21.Checked).ToString() + Convert.ToInt32(ckbSub000001_20.Checked).ToString() + Convert.ToInt32(ckbSub000001_19.Checked).ToString() + Convert.ToInt32(ckbSub000001_18.Checked).ToString() + Convert.ToInt32(ckbSub000001_17.Checked).ToString() + Convert.ToInt32(ckbSub000001_16.Checked).ToString(); Strlocal_input_state_record_flags = Convert.ToInt32(Strlocal_input_state_record_flags, 2).ToString();
備註:
UI轉整數/整數轉字串/二進位字串轉10進位
One thought on “C# UI(CHECKBOX) 轉 2進位/二進位 轉 10進位/十進位”
C# UI(CHECKBOX) 轉 2進制/二進制 轉 10進制/十進制