how to implement selective property-visibility in c#?
<p>Can we make a property of a class visible to public , but can only be modified by some specific classes?</p>

<p>for example, </p>

<pre><code>// this is the property holder
public class Child
{
    public bool IsBeaten { get; set;}
}

// this is the modifier which can set the property of Child instance
public class Father
{
    public void BeatChild(Child c)
    {
        c.IsBeaten = true;  // should be no exception
    }
}

// this is the observer which can get the property but cannot set.
public class Cat
{
    // I want this method always return false.
    public bool TryBeatChild(Child c)
    {
        try
        {
            c.IsBeaten = true;
            return true;
        }
        catch (Exception)
        {
            return false;
        }
    }

    // shoud be ok
    public void WatchChild(Child c)
    {
        if( c.IsBeaten )
        {
            this.Laugh();
        }
    }

    private void Laugh(){}
}
</code></pre>

<p><strong>Child</strong> is a data class,<br>
<strong>Parent</strong> is a class that can modify data,<br>
<strong>Cat</strong> is a class that can only read data.</p>

<p>Is there any way to implement such access control using Property in C#?</p>
