Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public enum DataType
- {
- Unspecified,
- Ai0
- }
- public class DataPoint
- {
- public int ID { get; set; }
- public DateTime Date { get; set; }
- public DataType DataType { get; set; }
- public float Value { get; set; }
- [Obsolete("do not use this for initialisation. It's for searalization only")]
- public DataPoint(){}
- public DataPoint(DataType DataType, float Value)
- {
- ID = Program.GetNewID();
- Date = DateTime.UtcNow;
- this.DataType = DataType;
- this.Value = Value;
- }
- public override string ToString()
- {
- return ID.ToString();
- }
- public override bool Equals(object obj)
- {
- if (obj is DataPoint)
- return ID == ((DataPoint)obj).ID;
- return false;
- }
- public override int GetHashCode()
- {
- return ID;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement