【发布时间】:2019-11-26 02:42:01
【问题描述】:
作为编码的大新手,我如何使以下部分正常工作?
我想捕获RadioButton 的Text。
例如
radio1.Text = weekly
radio2.Text = monthly
// Doesn't compile; to show the requirement only
if (radio1.checked) then 3
write weekly
else if (radio2.checked) then
write monthly
// write to txt file
var line = string.Join(Environment.NewLine,
$"First Name: {tfirstn.Text}",
$"Last Name: {tlastn.Text}",
$"Address: {taddr.Text}",
$"Mobile Number: {tmobi.Text}",
$"Recurring Payment Amount: {rpabox.Text}",
$"Account Number: {taccnbr.Text}",
// this should display "weekly" or "monthly" depending on radio button checked
$"Frequency: {}",
$"",
$"",
""
);
【问题讨论】:
-
这是 wpf 还是 winforms?
-
嘿兄弟,这是winforms