I'm trying to be able to call one subclass constructor or another, depending on the arguments values for the constructor:
public FlacFullContent(string path, bool isFlog=false)
{
if (isFlog)
{
using (FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read))
{
Track theTrack = new Track(fs, "audio/ogg");
// instead call base class constructor `base(fs, "audio/ogg")`
}
}
else
{
// call base class constructor `base(path)`
}
}
For a subclass public class FlacFullContent: Track
.
Is that possible ? How ?