Why do static Create methods exist?
Posted
by GeReV
on Stack Overflow
See other posts from Stack Overflow
or by GeReV
Published on 2010-03-18T13:55:46Z
Indexed on
2010/03/18
14:01 UTC
Read the original article
Hit count: 344
programming-languages
|language-agnostic
I was wondering, why do static Create
methods exist?
For instance, why use this code:
System.Xml.XmlReader reader = System.Xml.XmlReader.Create(inputUri);
over this code:
System.Xml.XmlReader reader = new System.Xml.XmlReader(inputUri);
I cannot find the rationale for using one over the other, and can't find any relation between classes who use this construct over the other.
Can anyone shed some light on this?
© Stack Overflow or respective owner