ProjectCollection.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.
Escape a string using MSBuild escaping format. For example, "%3b" for ";". Only characters that are especially significant to MSBuild parsing are escaped. Callers can use this method to make a string safe to be parsed to other methods that would otherwise expand it; or to make a string safe to be written to a project file.
public:
static System::String ^ Escape(System::String ^ unescapedString);
public static string Escape (string unescapedString);
static member Escape : string -> string
Public Shared Function Escape (unescapedString As String) As String
Parameters
- unescapedString
- String
The string to be converted.
Returns
The converted string.
Remarks
For example, "%3b" for ";". Only characters that are especially significant to MSBuild parsing are converted. Callers can use this method to make a string safe to be parsed by other methods that would otherwise expand it. Callers can also use this method to make a string safe to be written to a project file.