How to make return type current class, method will be used by subclass
<p>I am making a simulation of an ecosystem, it's very simple so don't worry about realism.
The reproduction method is located in the Organism class, it could be used exactly by the class Plant, except for the return type which is Organism:</p>

<pre><code>    public Organism Reproduce()
    {
        double[] copy = new double[genes.Count];
        for(int i = 0; i &lt; copy.Length; i++)
            // 10% chance to mutate, change up to 10%
            copy[i] = genes[i] + (Program.rand.Next(10) &lt; 1 ? 
                genes[i] * 0.2 * (Program.rand.NextDouble() - 0.5) : 0.0);
        return new Organism(genes);
    }
</code></pre>

<p>I know in Ruby it's possible to return 'self' so if the method is used by a class that extends this one, the method will return an object of the inheriting class.</p>

<p>So the question is: How can I modify this method so that when it's called from a Plant, it will make a Plant and return one?</p>
