I have created one windows form, there i have a progress bar, i want to update the value of progress bar, from another class. I have written one function in my class on its execution, i want to see the progress in progress bar.
For Example:
- The code written in forms .cs file:
namespace UpdateProgressBar
{
public partial class ProgressBarUdpate : Form
{
public ProgressBarUdpate()
{
InitializeComponent();
}
private void btn_Submit_Click(object sender, EventArgs e)
{
UpdateDataProgress updt = new UpdateDataProgress();
updt.ExecuteFucntion();
}
}
}
- The code written in another class
namespace UpdateProgress
{
public class UpdateDataProgress
{
public void ExecuteFucntion()
{
for (int i = 0; i < 100; i++)
{
}
}
}
}
My Expected output is when i call updt.ExecuteFucntion function it should update the progressbar values as per loop implemented in another class.