locked
How do you design this data? RRS feed

  • Question

  • Hi,

    I have these two classes which represent some stock data.  They do not have any behavior in them.  These classes have some common data like ExchangeSymbol, MySymbol and Time.  Do you think abstracting these to a base class a good idea?. Please share your thoughts.

    class SymbolData
        {
            public string ExchangeSymbol { get; set; }
            public string MySymbol { get; set; }
            public double Price { get; set; }
            public int Volume { get; set; }
            public string Time { get; set; }
        }

        class EquityQuoteData
        {
            public string ExchangeSymbol { get; set; }
            public string MySymbol { get; set; }
            public double AskPrice { get; set; }
            public double BidPrice { get; set; }
            public int AskVolumne { get; set; }
            public int BidVolumne { get; set; }
            public string Time { get; set; }
        }

    Thanks

     


    Ravi
    Wednesday, November 9, 2011 10:44 PM