Question: I have this algorithm

```
int oglinda(int n)
{
    if(n>9)
    {

        cout << n%10;
        oglinda(n/10);
    }
}

```

and it returns a number from right to left for example for 341=>143.
Here's the problem:
When the algorithm reaches the last number (which is < 9) it shouldn't receive it's value but instead it does. How comes that when the number is less than 9?

Answer: 
I think it's because the `as` keyword does both, type check and cast at once. So if you later using the sender, you don't have to cast it
You did not post all your code. I guess in your code, if the sender is a button, you cast it to button and do something with it. If that's the case, you did that work *twice*, once in the if and once in the statement block. Resharper told you to do it once and be done with it.