System.Xml.XmlWriter.LookupPrefix Method

When overridden in a derived class, returns the closest prefix defined in the current namespace scope for the namespace URI.

Syntax

public abstract string LookupPrefix (string ns)

Parameters

ns
The namespace URI whose prefix you want to find.

Returns

The matching prefix or null if no matching namespace URI is found in the current scope.

Exceptions

TypeReason
ArgumentException ns is null or string.Empty.

Remarks

Operation
As described above.

Note to Inheritors
This method must be overridden in order to provide the functionality described above, as there is no default implementation.

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0