DataColumn.Caption プロパティ
アセンブリ: System.Data (system.data.dll 内)

/** @property */ public String get_Caption () /** @property */ public void set_Caption (String value)
列のキャプション。キャプションが設定されていない場合は、ColumnName 値を返します。


新しい DataTable を作成する例を次に示します。次に、3 つの DataColumn オブジェクトを DataColumnCollection に追加し、各 DataColumn の Caption プロパティを設定します。
Private Sub CreateDataTable() Dim table As DataTable Dim column As DataColumn table = new DataTable("Customers") 'CustomerID column column = table.Columns.Add( _ "CustomerID", System.Type.GetType("System.Int32")) column.Unique = True 'CustomerName column column = table.Columns.Add( _ "CustomerName", System.Type.GetType("System.String")) column.Caption = "Name" 'CreditLimit column = table.Columns.Add( _ "CreditLimit", System.Type.GetType("System.Double")) column.DefaultValue = 0 column.Caption = "Limit" table.Rows.Add(new object() {1, "Jonathan", 23.44}) table.Rows.Add(new object() {2, "Bill", 56.87}) End Sub
private void CreateDataTable() { DataTable table; DataColumn column; table = new DataTable("Customers"); //CustomerID column column = table.Columns.Add("CustomerID", System.Type.GetType("System.Int32")); column.Unique = true; //CustomerName column column = table.Columns.Add("CustomerName", System.Type.GetType("System.String")); column.Caption = "Name"; //CreditLimit column = table.Columns.Add("CreditLimit", System.Type.GetType("System.Double")); column.DefaultValue = 0; column.Caption = "Limit"; table.Rows.Add(new object[] {1, "Jonathan", 23.44}); table.Rows.Add(new object[] {2, "Bill", 56.87}); }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からDataColumn.Caption プロパティを検索する場合は、下記のリンクをクリックしてください。

- DataColumn.Caption プロパティのページへのリンク