An abstract class may require a value to be passed through the constructor like the following example: public abstract class Node
{
private readonly Uri _uri;
protected Node( string address, string relativePath)
{
_uri = new Uri(Path.Combine(address, relativePath));
}
}
public class Element : Node
{
private const string relativePath = "/path" ;
public Element( string address)
: base (address, relativePath)
{
}
}
Alternatively, it can require that derived types implement...(read more)Image may be NSFW.
Clik here to view.
Clik here to view.
