XhtmlTextWriter コンストラクタとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > XhtmlTextWriter コンストラクタの意味・解説 

XhtmlTextWriter コンストラクタ (TextWriter, String)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

tabString パラメータに行インデント指定して、XhtmlTextWriter クラス新しインスタンス初期化します。サーバー コントロールまたは ASP.NET ページの行インデントカスタマイズする場合XhtmlTextWriter コンストラクタ使用します

名前空間: System.Web.UI
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Sub New ( _
    writer As TextWriter, _
    tabString As String _
)
Dim writer As TextWriter
Dim tabString As String

Dim instance As New XhtmlTextWriter(writer,
 tabString)
public XhtmlTextWriter (
    TextWriter writer,
    string tabString
)
public:
XhtmlTextWriter (
    TextWriter^ writer, 
    String^ tabString
)
public XhtmlTextWriter (
    TextWriter writer, 
    String tabString
)
public function XhtmlTextWriter (
    writer : TextWriter, 
    tabString : String
)

パラメータ

writer

XHTML コンテンツレンダリングする TextWriter

tabString

Indent定義されている空白数。

使用例使用例

XhtmlTextWriter クラスから派生したカスタム クラスに対して 2 つコンストラクタ作成する方法次のコード例示しますこの方法は、HtmlTextWriter クラスから直接または間接的に派生するすべてのクラスに対して標準的な方法です。

' Create a class that inherits from XhtmlTextWriter.
<AspNetHostingPermission(SecurityAction.Demand, _
    Level:=AspNetHostingPermissionLevel.Minimal)> _
<AspNetHostingPermission(SecurityAction.InheritanceDemand, _
    Level:=AspNetHostingPermissionLevel.Minimal)> _
Public Class CustomXhtmlTextWriter
    Inherits XhtmlTextWriter

    ' Create two constructors, following 
    ' the pattern for implementing a
    ' TextWriter constructor.
    Public Sub New(writer
 As TextWriter)
      MyClass.New(writer, DefaultTabString)
    End Sub 'New


    Public Sub New(writer
 As TextWriter, tabString As String)
      MyBase.New(writer, tabString)
    End Sub 'New
// Create a class that inherits from XhtmlTextWriter.
[AspNetHostingPermission(SecurityAction.Demand, 
    Level=AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, 
    Level=AspNetHostingPermissionLevel.Minimal)] 
public class CustomXhtmlTextWriter : XhtmlTextWriter
{
    // Create two constructors, following 
    // the pattern for implementing a
    // TextWriter constructor.
    public CustomXhtmlTextWriter(TextWriter writer) : 
        this(writer, DefaultTabString)
    {
    }


    public CustomXhtmlTextWriter(TextWriter writer, string
 tabString) : 
        base(writer, tabString)
    {
    }
// Create a class that inherits from XhtmlTextWriter.
/** @attribute AspNetHostingPermission(SecurityAction.Demand, 
    Level = AspNetHostingPermissionLevel.Minimal)
 */
/** @attribute AspNetHostingPermission(SecurityAction.InheritanceDemand,
    Level = AspNetHostingPermissionLevel.Minimal)
 */
public class CustomXhtmlTextWriter extends
 XhtmlTextWriter
{
    // Create two constructors, following 
    // the pattern for implementing a
    // TextWriter constructor.
    public CustomXhtmlTextWriter(TextWriter writer)
    {
         this(writer, DefaultTabString);
    } //CustomXhtmlTextWriter

    public CustomXhtmlTextWriter(TextWriter writer, String tabString)
    {
         super(writer, tabString);
    } //CustomXhtmlTextWriter
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
XhtmlTextWriter クラス
XhtmlTextWriter メンバ
System.Web.UI 名前空間

XhtmlTextWriter コンストラクタ


XhtmlTextWriter コンストラクタ (TextWriter)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

DefaultTabString フィールド指定されている行インデント使用する、XhtmlTextWriter クラス新しインスタンス初期化します。既定の行インデント変更しない場合XhtmlTextWriter コンストラクタ使用します

名前空間: System.Web.UI
アセンブリ: System.Web (system.web.dll 内)
構文構文

解説解説
使用例使用例

XhtmlTextWriter クラスから派生したカスタム クラスに対して 2 つコンストラクタ作成する方法次のコード例示しますこの方法は、HtmlTextWriter クラスから直接または間接的に派生するすべてのクラスに対して標準的な方法です。

' Create a class that inherits from XhtmlTextWriter.
<AspNetHostingPermission(SecurityAction.Demand, _
    Level:=AspNetHostingPermissionLevel.Minimal)> _
<AspNetHostingPermission(SecurityAction.InheritanceDemand, _
    Level:=AspNetHostingPermissionLevel.Minimal)> _
Public Class CustomXhtmlTextWriter
    Inherits XhtmlTextWriter

    ' Create two constructors, following 
    ' the pattern for implementing a
    ' TextWriter constructor.
    Public Sub New(writer
 As TextWriter)
      MyClass.New(writer, DefaultTabString)
    End Sub 'New


    Public Sub New(writer
 As TextWriter, tabString As String)
      MyBase.New(writer, tabString)
    End Sub 'New
// Create a class that inherits from XhtmlTextWriter.
[AspNetHostingPermission(SecurityAction.Demand, 
    Level=AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, 
    Level=AspNetHostingPermissionLevel.Minimal)] 
public class CustomXhtmlTextWriter : XhtmlTextWriter
{
    // Create two constructors, following 
    // the pattern for implementing a
    // TextWriter constructor.
    public CustomXhtmlTextWriter(TextWriter writer) : 
        this(writer, DefaultTabString)
    {
    }


    public CustomXhtmlTextWriter(TextWriter writer, string
 tabString) : 
        base(writer, tabString)
    {
    }
// Create a class that inherits from XhtmlTextWriter.
/** @attribute AspNetHostingPermission(SecurityAction.Demand, 
    Level = AspNetHostingPermissionLevel.Minimal)
 */
/** @attribute AspNetHostingPermission(SecurityAction.InheritanceDemand,
    Level = AspNetHostingPermissionLevel.Minimal)
 */
public class CustomXhtmlTextWriter extends
 XhtmlTextWriter
{
    // Create two constructors, following 
    // the pattern for implementing a
    // TextWriter constructor.
    public CustomXhtmlTextWriter(TextWriter writer)
    {
         this(writer, DefaultTabString);
    } //CustomXhtmlTextWriter

    public CustomXhtmlTextWriter(TextWriter writer, String tabString)
    {
         super(writer, tabString);
    } //CustomXhtmlTextWriter
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
XhtmlTextWriter クラス
XhtmlTextWriter メンバ
System.Web.UI 名前空間



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「XhtmlTextWriter コンストラクタ」の関連用語

XhtmlTextWriter コンストラクタのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



XhtmlTextWriter コンストラクタのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS