HtmlTextWriter.SelfClosingTagEnd HtmlTextWriter.SelfClosingTagEnd HtmlTextWriter.SelfClosingTagEnd HtmlTextWriter.SelfClosingTagEnd Field

定義

表示自我結尾標記項目的結尾斜線符號和右角括弧 (/>)。Represents the closing slash mark and right angle bracket (/>) of a self-closing markup element.

public: System::String ^ SelfClosingTagEnd;
public const string SelfClosingTagEnd;
val mutable SelfClosingTagEnd : string
Public Const SelfClosingTagEnd As String 

欄位值

範例

下列程式碼範例示範如何呈現自訂FileName屬性的值,後面加上引號和SelfClosingTagEnd欄位所表示的字元。The following code example shows how to render the value of a custom FileName property followed by a quotation mark and the characters represented by the SelfClosingTagEnd field. 此程式碼範例會Write呼叫方法,並SelfClosingTagEnd傳遞欄位做為參數引數,以關閉元素。The code example calls the Write method and passes the SelfClosingTagEnd field as the parameter argument to close the element.

這個程式碼範例會FileName轉譯屬性值,然後呈現下列標記:This code example renders the FileName property value, and then the following markup:

" />

// Write the name of the image file from the 
// FileName property, close the path, and then
// close the <img> element.
writer.Write(FileName);
writer.Write(HtmlTextWriter.DoubleQuoteChar);
writer.Write(HtmlTextWriter.SelfClosingTagEnd);
' Write the name of the image file from the 
' FileName property, close the path, and then
' close the <img> element.
writer.Write(FileName)
writer.Write(HtmlTextWriter.DoubleQuoteChar)
writer.Write(HtmlTextWriter.SelfClosingTagEnd)

備註

當您建立自我結束記號RenderBeginTag元素時,方法會使用欄位。SelfClosingTagEndThe SelfClosingTagEnd field is used by the RenderBeginTag method when constructing self-closing markup elements.

適用於

另請參閱