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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -