Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public abstract class DayInfo
- {
- protected void GetInfoCore()
- {
- throw new System.NotImplementedException();
- }
- //Changed return type to "object" instead of "void"
- public object GetInfo()
- {
- GetInfoCore();
- return null;
- }
- }
- public class DayInfo<T> : DayInfo
- {
- private T info;
- public DayInfo(T data)
- {
- info = data;
- }
- //If this is removed it will default back to the original function from the base class and throw an exception
- public new T GetInfo()
- {
- return info;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement