2020-03-30 每日一例第22天ui
1.新建對話框,拖label/textbox/button控件;spa
2.後臺代碼;blog
//聲明字段後臺
StringBuilder sb = new StringBuilder(text1.Text);遍歷
//遍歷
for (int i = 0; i < sb.Length; i++)
{im
//判斷換行條件
if (sb[i]=='/')
{margin
//插入新行
sb.Insert(++i,Environment.NewLine);
}
text2.Text = sb.ToString();db
}img