This is a simple concept that I haven't had trouble with before, so help is deeply appreciated.

```
public partial class Player
{
    public string Name
    { get; private set; }

    public int Id
    { get; private set; }
}

public partial class ExtendedPlayer : Player
{
    public string Color = "";
}

public class MainProgram
{
    static void Main()
    {
        Player p = new Player();

        // The following creates a null object "ep":
        ExtendedPlayer ep = p as ExtendedPlayer;

        // For proof, NullReferenceException is thrown here:
        ep.Color = "red";
    }
}

```

A few of the other articles I read on SO resort to creating `ep` and then manually assigning all the values of `p` to it. This is not possible, for `Player` is only readable. 

Another solution I've read is to make `Player` into an `interface`, but I can't do that either because there are Player objects.

P.S. In my situation, `Player` is actually part of a library. I created the library, so I can change its properties, but I do not want the properties to be editable. I can, however change the fact it is partial, if that is creating a problem.