Thank you for your question.
Say you have a big method. This method performs various works step by step. You want to show progress in every stage. You will call this method by a button click like btnCalculateInterest. How you show progress to your calling method. This is not possible by return value in every stage to calling method. You have to perform all the tasks in CalculateInterest method then return. To provide this type solution you need ref.
private void CalculateInterest(ref int i)
protected void btnCalculateInterest_Click(object sender, EventArgs e)
int val = 1;
CalculateInterest(ref val );
lblStatus.Text="Progress " + val.ToString() + " percentage or something" ;