Utilities.Escape(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Converts the specified string into a syntax that allows the MSBuild engine to interpret the character literally.
public:
static System::String ^ Escape(System::String ^ unescapedExpression);
public static string Escape (string unescapedExpression);
static member Escape : string -> string
Public Shared Function Escape (unescapedExpression As String) As String
Parameters
- unescapedExpression
- String
The string to convert.
Returns
The converted value of the specified string.
Remarks
Certain characters have special meaning in MSBuild project files. Examples of the characters include semicolons (;) and asterisks (*). In order to use these special characters as literals, they must be specified with the syntax %nn, where nn represents the ASCII hexadecimal value of the character. This method performs that conversion.