I know it's a tautology to have a static abstract method, but how can I do something like this:
Base, abstract class:
abstract class QTimerDatabaseObject {
public static abstract QTimerDatabaseObject createFromQTimer(DataRow QTimerRow);
public abstract void saveRow();
}
Sample Implementation (Inside a User class that extends the QTimerDatabaseObject):
public static override QTimerDatabaseObject createFromQTimer(DataRow QTimerRow) {
int ID = (int)QTimerRow["id"];
string Username = QTimerRow["username"].ToString();
string Init = (QTimerRow["init"] ?? "").ToString();
string FirstName = (QTimerRow["FirstName"] ?? "").ToString();
string MiddleInitial = (QTimerRow["Midinit"] ?? "").ToString();
string LastName = (QTimerRow["Lastname"] ?? "").ToString();
string Salutation = (QTimerRow["salutation"] ?? "").ToString();
int RefNum = (int)(QTimerRow["refnum"] ?? -1);
int Timestamp = (int)(QTimerRow["timestamp"] ?? -1);
int DelCount = (int)(QTimerRow["delcount"] ?? 0);
bool IsHidden = (bool)(QTimerRow["hidden"] ?? false);
return new User(ID, Username, Init, FirstName, MiddleInitial, LastName, Salutation, RefNum, Timestamp, DelCount, IsHidden);
}
How can I do something like that?