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: 
You can try with this:

```
string s = "1sdfa";
bool isDigit = char.IsDigit(s[0]);

```

Also, if you wanted additional checks on string, you could do them like this:

```
bool isDigit = !string.IsNullOrEmpty(s) && char.IsDigit(s[0]);

```
hello u can use this...

```
string something = "some string";
bool isDigit = char.IsDigit(something[0]);

```