I am looking to \'extending\' an interface by providing set accessors to properties in that interface. The interface looks something like this:
interface IUser
You could use an abstract class:
interface IUser
{
string UserName
{
get;
}
}
abstract class MutableUser : IUser
{
public virtual string UserName
{
get;
set;
}
}
Another possibility is to have this:
interface IUser
{
string UserName
{
get;
}
}
interface IMutableUser
{
string UserName
{
get;
set;
}
}
class User : IUser, IMutableUser
{
public string UserName { get; set; }
}