3
Answers

Help with String

Anthony Clarke

Anthony Clarke

13y
1.4k
1
Hi I have a linq query to insert a value from a long string


private void markInvoicesIndispute()
String[] invoices = Invoices.Lines;
foreach (String inv in invoices)
{

StripNonNumerics(inv);

}


public
string StripNonNumerics(string inputString)
{
return new String(inputString.Where(c => Char.IsDigit(c)).ToArray());

This is the bit that is bothering me ------ Although it says return new string how to i output this say to a messagebox? e.g. messagebox.show(inputstring) ???

Thanks in advance
Anthony

}
Answers (3)