Answer:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
int count = 0;
string countInfo = "0" ;
string info = "";
string newline = Environment.NewLine;
public Form1()
{
InitializeComponent();
label1.Text = count.ToString();
}
private void button1_Click(object sender, EventArgs e)
{
//push counter
count += 1;
//add the new push to the previous count
countInfo = countInfo + count.ToString();
//add the new puch trail to all trails with newline
info = info + countInfo + newline ;
label1.Text = info;
}
}
}
Step-by-step explanation:
Application designed using Desktop App for c#.