<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=6889170&amp;fmt=gif">
Skip to content
  • There are no suggestions because the search field is empty.

Methods | TryDetectTextFileEncoding Method

Detects and returns the encoding of a text file. A return value indicates the detection was likely successful.

Syntax

C# Copy
public static bool TryDetectTextFileEncoding(
	string filePath,
        out Encoding fileEncoding
)

Parameters
filePath    String
              The path of the text file to detect encoding.
fileEncoding    Encoding
              When this method returns, contains the detected encoding. If the detection was not successful, the fileEncoding parameter will be null.

Return Value
Boolean
true if the encoding was likely detected successfully; otherwise, false.

See Also

Reference
ScriptUtil Class
Compiled.EDD.Scripting Namespace