I wonder what is the best way to use substring function on a string in reverse mode?

For example I have a string like:

```
string mainStr= @"CDM\D1_1";

```

Now I want to check if the last two characed are equal to "\_1" or not. Note: I dont want to use split on underscore. Just looking for the fastest way to do a reversed substring that is start from last char in string and end to first char. I tried this so far, but not sure if it works!

```
string revStr = new string(mainStr.ToCharArray().Reverse().ToArray());
if (revStr.Substring(0, 2) == "_1")
{
   //Do blah blah
}

```

**UPDATE**

Sorry to bother guys but it is Monday you know! so the problem was I should check for "1\_" after reversing the array. Yet it better to do with string.EndsWith as suggested below.