I have several procedures, for simplicity, look like this:
public string FetchValueAsString(string key) public int FetchValueAsInteger(string key) public bool FetchValueAsBoolean(string key) public DateTime FetchValueAsDateTime(string key)
I know that I can only have one method that returns the type of an object and just does the conversion, but I wonder if there is a way that I can just call one method and somehow use generics to determine the return value .. . perhaps?
source share