hi guys trouble again, i want to print year from 1980 up to 2050 using loop in richtextbox and apply newline every print. thnx in advance guys

Recommended Answers

public Form1()
      {
         InitializeComponent();
         for (int i = 1980; i < 2051; i++)
         {
            richTextBox1.Text += i.ToString() + '\n';
         }
      }
Jump to Post

All 3 Replies

public Form1()
      {
         InitializeComponent();
         for (int i = 1980; i < 2051; i++)
         {
            richTextBox1.Text += i.ToString() + '\n';
         }
      }

O you can use like this way also

for (int i = 1980; i < 2051; i++)
            {
                richTextBox1.Text += i.ToString() + Environment.NewLine  ;
            }

thnx guys all your codes are working fine thank you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.