다음을 통해 공유


CodeGeneration.EscapeFormatStringContent(String) Method

Definition

Escapes content so that it is safe for inclusion in a string that will later be used as a format string. If this is to be embedded inside of a single-quoted string, be sure to also call EscapeSingleQuotedStringContent. For example: "'" + EscapeSingleQuotedStringContent(EscapeFormatStringContent(userContent)) + "'" -f $args.

public:
 static System::String ^ EscapeFormatStringContent(System::String ^ value);
public:
 static Platform::String ^ EscapeFormatStringContent(Platform::String ^ value);
 static std::wstring EscapeFormatStringContent(std::wstring const & value);
public static string EscapeFormatStringContent (string value);
static member EscapeFormatStringContent : string -> string
Public Shared Function EscapeFormatStringContent (value As String) As String

Parameters

value
String

The content to be included in a format string.

Returns

Content with all curly braces escaped.

Applies to