Q:

Operator '>' cannot be applied to operands of type 'System.Diagnostics.Stopwatch'

I'm currently developing a 2d space shooter in Monogame. In my game I use Stopwatches to manage delays between events such as the player ship's shot delay and various enemy ship's attacks.
For example, when the user presses space bar I call the following method:
if (currentKeyboardState.IsKeyDown(Keys.Space))
{
    if (Logic.PlayerShotDelay.ElapsedMilliseconds > Projectile.shotdelay)
    {
        // Fire player shot code

        Logic.PlayerShotDelay.Restart();
    }
}

The above code works perfectly, no problems. However I try to use the same technique in another method:
if (currentanimation.frame < 13)
{
    if (Logic.FrameDelay.ElapsedMilliseconds > Logic.FrameDelay)
    {
         currentanimation.Draw(spriteBatch);
         currentanimation.frame++;
         Logic.FrameDelay.Restart();
    }
}

And I get the following error:
Error 1 Operator '>' cannot be applied to operands of type 'long' and 'System.Diagnostics.Stopwatch'        
Both Projectile.shotdelay and Logic.FrameDelay are static ints. As far as I can see, my if statements are functionally identical. I'm completely confused as to why this isn't working. Upon searching I've got results relating to non nullable ints but I can't apply the solutions to given to my particular problem. Any help would be much appreciated. 
Many thanks!         

A:

in the same line you are treating FrameDelay as a class and as a "int"
Logic.FrameDelay.ElapsedMilliseconds > Logic.FrameDelay

