compiler select an profusion between interface exception


trying an excpetion category yield plcae anxiety xml parsing, found an engaging function - compiler select between profusion consumes an interface needs system.exception i perplexing pass xmlreader parameter.



detais following:



//exception overloads:
public filterxmlparseexception(string message, difference innerexception)
: base(message, innerexception) { }
public filterxmlparseexception(string message, ixmllineinfo lineinfo) {...}

//usage:
xmlreader reader = ...
ixmllineinfo lineinfo = (ixmllineinfo)reader;

//fails
throw new filterxmlparseexception("<filter> component expected", reader);

//ok
throw new filterxmlparseexception("<filter> component expected", lineinfo);


and fails given name repremand overload.but why? xmlreader supports an interface hereditary system.exception



Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members