CodeGeneration.EscapeVariableName(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.
Escapes content so that it is safe for inclusion in a string that will later be used in a variable name reference. This is only valid when used within PowerShell's curly brace naming syntax.
For example: '${' + EscapeVariableName('value') + '}'
public:
static System::String ^ EscapeVariableName(System::String ^ value);
public:
static Platform::String ^ EscapeVariableName(Platform::String ^ value);
static std::wstring EscapeVariableName(std::wstring const & value);
public static string EscapeVariableName (string value);
static member EscapeVariableName : string -> string
Public Shared Function EscapeVariableName (value As String) As String
Parameters
- value
- String
The content to be included as a variable name.
Returns
Content with all curly braces and back-ticks escaped.