In interface you can define only getter
for your property
interface IFoo
{
string Name { get; }
}
However, in your class you can extend it to have a private setter
–
class Foo : IFoo
{
public string Name
{
get;
private set;
}
}