More Informations:
EDIT: better sample:
I have a class in a Libary called UserAccount, its abstact. then i have some functionality like this in the library:
class UserAccountService
{
public static UserAccount CreateUserAccount(String username, String password, String email)
{
UserAccount account = new UserAccount();
account.Username = username;
account.HashedPass = //Some crypting stuff with password
account.Email = email;
UserAccountRepository db = new UserAccountRepository();
db.UserAccounts.Add(account);
return account;
}
}
Cuz this is a independent library the UserAccount has not all Propertys i want to use:
class ExtendedUserAccount : UserAccount
{
// define some additional methods and propertys
public Contact Contacts{get;set}// this property is only used in one application where i use the Library....
}
Then i want to do this:
ExtendedUserAccount newAccount = UserAccountService.CreateUserAccount(new UserAccount);
But this will not work. i now its not correct but i need something similar...
anyone has an idea??