return type in C#
<p>I have two classes named <strong>ROAD</strong> and <strong>PATH</strong></p>

<pre><code>public class ROAD
{
    public string getData()
    {
      return "Marlton Road";
    }
}

public class PATH
{
    public string getData()
    {
        return "Tagore Path";
    }
 }
</code></pre>

<p>Also i have a function named FETCH() in my Static Void Main</p>

<p>FETCH() contains following code</p>

<pre><code>public returnType FETCH(bool flag)
{
    if(flag)
    {
       ROAD obj=new ROAD();
       return obj;
    }
    else
    {
       PATH obj=new PATH();
       return obj;
    }
}
</code></pre>

<p>Now my question is what should be the return type of function FETCH().
Or is there any other way to implement this logic.</p>
