//this method creates a DateTime once a new telegram was received, used by database as history informations public string HeaderDateTime(ref TelegramHeader th) { DateTime dt = DateTime.Now; th.Day = (ushort)dt.Day; th.Month = (ushort)dt.Month; th.Year = (ushort)dt.Year; th.Hour = (ushort)dt.Hour; th.Minute = (ushort)dt.Minute; th.Second = (ushort)dt.Second; return(string.Format("{0:D4}-{1:D2}-{2:D2} {3:D2}:{4:D2}:{5:D2}", th.Year, th.Month, th.Day, th.Hour, th.Minute, th.Second)); }
public TelegramHeader Shallowcopy() { TelegramHeader th = (TelegramHeader)this.MemberwiseClone(); return(th); }