P
Pluto
I have a private field like:
private XmlDocument xmlDocument;
In the constructor, I have:
xmlDocument = new XmlDocument();
Is it better to instantiate the XmlDocument in the field declaration like:
private XmlDocument xmlDocument = new XmlDocument();
Does it even matter? What is the order of things happening? Does constructor
or field execute first?
Thanks.
private XmlDocument xmlDocument;
In the constructor, I have:
xmlDocument = new XmlDocument();
Is it better to instantiate the XmlDocument in the field declaration like:
private XmlDocument xmlDocument = new XmlDocument();
Does it even matter? What is the order of things happening? Does constructor
or field execute first?
Thanks.