ALS.Device.SBox oSBox = new ALS.Device.SBox();
One of the properties of my class is:private static System.Int32 _CumulativeDataRead = 0; public System.Int32 CumulativeDataRead { get{ return SBox._CumulativeDataRead;} }Now the first time I click the button every thing is fine (CumulativeDataRead = 0), but the next time I click the button the value returned by CumulativeDataRead is equal to the number of bytes I received with the last transmission (CumulativeDataRead=281). The object oSBox is scoped to the button click method so you think it would be disposed after the button click method is completed. What I ended up doing, for the time beeing, is to add
SBox._CumulativeDataRead = 0
in the constructor of the class to ensure that the value is reset upon creation of the object oSBox and this works.