XmlDictionaryWriter is an abstract class.
Why then does it have a constructor?
Why can its method "CreateBinaryWriter" return an instance of this abstract class?
I understand CreateBinaryWriter passes a stream to which the instance of this "abstract" class writes.
It makes me wonder how abstract "abstract" really is...
By all that has been elaborated on the keyword abstract this does not fit the picture.
Code:
MemoryStream WriteName(Name name)
{
var ms = new MemoryStream();
var binary = XmlDictionaryWriter.CreateBinaryWriter(ms);
var ser = new DataContractSerializer(typeof(FullName));
ser.WriteObject(binary, name);
return ms;
}
Could s.o. explain?
thx