I was just going through certain code...I wanted to know what the following code means
string format = "//User[UserName=\"{0}\" and EncryptPassword=\"{1}\"]";
string xpath = String.Format( format, userName, password );
xpath is later used to create xPathNodeIterator object. I dont quite understand how String.Format is used and which node will the XPathNodeIterator will be iterating through if I iterate?
Read the details of String.Format. It
it means that xpath will contain format string where {0} in the format string will be replaced with value of username and {1} will be replaced with value of password
Assuming that
Xpath will be equivalent to