Question: I need to check if the first element of a string is positive integer in C#.
is there a smart Way to do this?
Fx

```
string str = "2001";
if (str.First() == isANumber) {
...                                
}

```

Answer: 
Can use [Char.IsDigit](http://msdn.microsoft.com/en-us/library/0t641e58.aspx)

```
Char.IsDigit(str[0])

```
```
string str = "2001";

if (char.IsDigit(str.First())
{
   if(Convert.toInt32(str.First().ToString()) >= 0)
   {
     // positive integer
   }
}

```