共用方式為


SPHttpUtility.AddQuote Method (String, Char, TextWriter)

Encloses the specified string in quotation marks using the specified character and appends it to the specified output stream.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Shared Sub AddQuote ( _
    value As String, _
    quoteCharacter As Char, _
    output As TextWriter _
)
'Usage
Dim value As String
Dim quoteCharacter As Char
Dim output As TextWriterSPHttpUtility.AddQuote(value, quoteCharacter, _
    output)
public static void AddQuote(
    string value,
    char quoteCharacter,
    TextWriter output
)

Parameters

  • value
    Type: System.String

    The string to enclose in quotation marks.

  • quoteCharacter
    Type: System.Char

    A 16-bit Char representing the quotation mark character to use.

Remarks

Characters in the original text are not escaped.

The value of the quoteCharacter parameter can be any value.

See Also

Reference

SPHttpUtility Class

SPHttpUtility Members

AddQuote Overload

Microsoft.SharePoint.Utilities Namespace