Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
244 views
in Technique[技术] by (71.8m points)

c# for each line in multi-line textbox copy and paste into another textbox

I want for each line in multi-line textbox1 to copy each line into textbox2 and then check if value is true in textbox2. then if value is true, copy textbox2 and paste into textbox3.

    private void button1_Click(object sender, EventArgs e)
    {


        foreach (string line in textBox1.Lines) //textbox1 is multi line and it needs to perform a button2 check for each line
        {
            textBox2.Text = line; // 
            button2.PerformClick();

        }}


    private void button2_Click(object sender, EventArgs e)
    {

            if(textBox2.Text == "0")
            {
                textBox3.Text = "
" + textBox2.Text;
            }}
question from:https://stackoverflow.com/questions/65840005/c-sharp-for-each-line-in-multi-line-textbox-copy-and-paste-into-another-textbox

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...