c# - Check if label is more than a specific value -


i made clock , want users able select timezone, clock can go on 24 hours should not possible, needs start on @ 00:00.

this i've come far, keep getting error input string not in correct format.

if (convert.toint32(label1.text) > 24) {      int test = convert.toint32(label1.text) - 24;      label1.text = test.tostring(); } 

i've tried searching around , thing come tryparse doesn't work either

you should have instance of business object represent clock entity. , label should display values/properties of business object.

public class clock {        private int _hour;      public void increment()     {        if (_hour > 23)           _hour = 0;        else           _hour++;         // raise event     }      public event eventhandler hourchanged;      public int hour { { return _hour; } } } 

instanciate class in windows forms application, sign event , show hour property


Comments

Popular posts from this blog

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -