I\'m new in c# or any type of programming language. When I see codes in c# I found there are lot of confusions are over here. one of them I want to clarify from here. Methods co
In GetStockData
method return type would be StockData
i.e. you will have to return an instance of StockData
class or any sub-class inherited from StockData
. It depends on your code whether you create that instance in the GetStockData
method or get from some other method, but surely type of the instance should be StockData
or any sub-class inherited from StockData
class.