(EDIT: I just checked, and it works even when the property type matches the declaration type. However, it does not work when you try to declare a property in a public type where the property type is internal.)
You cannot do this in C # (strictly speaking), but you can do something very similar:
protected internal int Length { get; protected set; }
(for simplicity, an automatically implemented property is used, just as for a regular property).
This will make a getter available for any type within the same assembly and derived types; "setter" will be available only for derived types. Since your class is internal, one way or another, this is pretty much equivalent anyway - the getter will theoretically be available for types outside the assembly, but since the class is internal, nothing from the other assembly should come from your type anyway.
The problem is that properties require one access level to be a "subset" of another; internal and protected do not work like this: one type can be in the same assembly, but not obtained from the corresponding type; another type can be obtained from it, but in a different assembly. They are orthogonal, basically.
The above solution works because protected internal means that it is available to any type that is either in the same assembly or derived from that type. It is clear that each of protected and internal individually is a subset of this.
You could create an internal property that was further restricted to the installer if C # had some equivalent level of access to the CLR family and assembly. ( protected internal equivalent to "family or assembly".) Unfortunately for you this is not so: (
If you really want the goals originally stated (for example, if you have a public class to which you want to apply the same restrictions), you will have to make at least one of them a separate method, for example
private int length; internal int Length { get { return length; } } protected void SetLength(int value) { this.length = value; }