What would be the best way to implement the following?
I have a collection of objects that implement an interface, internally I want to be able to expose set and get on the properties and externally only get.
Here's an example of the sort of thing I want... That does't compile.
public interface ITable
{
string Name { get; }
}
internal interface IInternalTable
{
string Name { get; set; }
}
internal class Table : ITable, IInternalTable
{
public string Name { get; set; }
public string ITable.Name { get { return Name; } }
}
public class Database
{
private List<IInternalTable> tables;
public List<ITable>
{
get { return this.tables; }
}
}