Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
たとえば、テキストボックスに番号を書き込むときに必要です。テキストボックスに番号4を書き込んでから、リッチテキストボックスのボタンをクリックします。4つの「A」(AAAA)があります。リッチテキストボックスに番号6を書き込むと、6つの「A」(AAAAAA)があります。
var sb = new StringBuilder(); for(int i = 0 i < int.Parse(textBox.Text); i++) { sb.Append("A"); } rtb.Text = sb.ToString()