ContainsNumericChars
public static class ext { public static bool ContainsNumericChars(this string s) { return s.IndexOfAny("0123456789".ToArray())>=0; } }Example:
string s = "sdfsdfsf"; bool b = s.ContainsNumericChars();
Description
returns true if string contains numeric chars
Details
- Author: UnstableMutex
- Submitted on: 21-10-2013 14:13:52
- Language: C#
- Type: String
- Views: 2504
Double click on the code to select all.