EncodingHelper Class

A utility class that gets the encoding of a file from its byte order mark.

Inheritance Hierarchy

Object
  Microsoft.VisualStudio.TextTemplating.EncodingHelper

Namespace:  Microsoft.VisualStudio.TextTemplating
Assembly:  Microsoft.VisualStudio.TextTemplating.11.0 (in Microsoft.VisualStudio.TextTemplating.11.0.dll)

Syntax

'Declaration
Public NotInheritable Class EncodingHelper
public static class EncodingHelper
public ref class EncodingHelper abstract sealed
[<AbstractClass>]
[<Sealed>]
type EncodingHelper =  class end
public final class EncodingHelper

The EncodingHelper type exposes the following members.

Methods

  Name Description
Public methodStatic member GetEncoding Determines the encoding of the specified file from its byte order mark.

Top

Remarks

When a user creates a text template, they can specify the encoding that they want the text template host to use to create the generated text. If the user does not specify the encoding, the host can try to determine the encoding of the text template. The host can then use the same encoding to create the generated text.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.TextTemplating Namespace

Other Resources

Byte Order Mark

Code Generation and T4 Text Templates

How to: Specify File Output Types in Text Templates

T4 Text Template Directives