Czy ktoś może podać przykład użycia funkcji WinRT dla funkcji XmlDocument.SelectSingleNodeNS? Nie jestem pewien, czego oczekuje drugi parametr i nie mogę znaleźć przykładu.Jaki format jest oczekiwany przez parametr przestrzeni nazw w SelectSingleNodeNS
public IXmlNode SelectSingleNodeNS(
string xpath,
object namespaces
)
Contains a string that specifies the namespaces to use in XPath expressions when it is necessary to define new namespaces externally. Namespaces are defined in the XML style, as a space-separated list of namespace declaration attributes. You can use this property to set the default namespace as well.
Nie, nie ma kary za wydajność. Spójrz na ten [odpowiedzi] [1] [1]: http://stackoverflow.com/questions/256859/is-there-a-performance-difference-between-a -for-loop-and-a-for-each-loop –