0

I have a method returnNo in C# that returns a string as shown below.

public string RecordNo()
{
    //Get the string of the Record No from the page
    string recordSavedNumber = recordNoForRecord.Text.Replace("- Record #", "");
    return recordSavedNumber;
}

I also want to use the recordSavedNumber returned by the method above as input parameter in a searchMethod show below

public void searchRecord(string recordNum){
// do something
}

Can someone please assist how I can do that?

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
LMU
  • 1

1 Answers1

2

Like this

 var num = RecordNo();
 searchRecord(num);

or like this:

searchRecord(RecordNo());
Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
pm100
  • 48,078
  • 23
  • 82
  • 145