Reputation: 1
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?
Upvotes: 0
Views: 191
Reputation: 50230
Like this
var num = RecordNo();
searchRecord(num);
or like this:
searchRecord(RecordNo());
Upvotes: 2