-5

I need to check if my String contains Alphabet Characters. Because it needs to just contains a number.

         String^ buffer;
         buffer = this->textBox4->Text;
Amber
  • 1

1 Answers1

0

Look at the regular expressions provided by the .NET Framework, such as ^\d+^. (Assuming whole numbers only).

npinti
  • 51,780
  • 5
  • 72
  • 96
  • 1
    @Amber: What framework are you using? `C#`, `VB.Net`, `C++.Net`, `F#` or something else? – npinti Feb 02 '15 at 08:48
  • @Amber: Take a look at [this](https://msdn.microsoft.com/en-us/library/kxwfbb3b.aspx) link. IF you combine it with the regular expression I provided, the code should yield `False` if the string is made from characters which are not numbers. – npinti Feb 02 '15 at 09:28