ResolvedResource.GetTextReader MethodResolvedResource.GetTextReader MethodResolvedResource::GetTextReader Method

Gets a TextReaderTextReaderTextReader over the resource.

Syntax

Public Function GetTextReader( _
    encoding As System.Text.Encoding _
) As System.IO.TextReader
public System.IO.TextReader GetTextReader(
    System.Text.Encoding encoding
)
public:
System.IO::TextReader^ GetTextReader(
    System.Text::Encoding^ encoding
)
 

Parameters

encoding

Type: System.Text.EncodingSystem.Text.EncodingSystem.Text::Encoding^

The encoding to use if it has not been specified. This is equivalent to the $encoding argument on fn:unparsed-text.

Exceptions

ExceptionCondition
XmlExceptionXmlExceptionXmlExceptionThe encoding specified is not supported.

Remarks

This will cause the encoding of the resource to be set, if it has not been already.

The behavior of this method is the same as the unparsed-text function.