Class Feature Syntax
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Class Feature Syntax 

You use the class feature blocks in your text templates to add helper functions to avoid repeating common code. The general syntax is:

<#+ FeatureCode #>

The following code sample shows how to use the class feature:

private string FixWhiteSpaces(string s)
    return(Regex.Replace(s," ","").ToString());


To debug text templates you must set the debug parameter of the template directive. For more information, see How to: Debug Text Templates.


For more information, see Security of Text Templates.

See Also

© 2015 Microsoft