views:

122

answers:

2

[C#] How to write this statement into coding?

I declare my Video Time Value as "VideoTime.Value"

            **if (Video Time Value is equal to 4 sec)
            {
                MessageBox.Show("Video Paused");
            }**
+1  A: 

Provided VideoTime.Value is an Int / Long value which contains the number of seconds

if (VideoTime.Value == 4)
{
    MessageBox.Show("Video Paused");
}

If this is not what you are asking for, please add some more specific details to the question.

InSane
A: 

Or, if you want to use extension methods to do units:

if (VideoTime.Value == 4.Seconds()) { ... }
Dan