IDataSource.GetViewNames メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > IDataSource.GetViewNames メソッドの意味・解説 

IDataSource.GetViewNames メソッド

メモ : このメソッドは、.NET Framework version 2.0 で新しく追加されたものです。

IDataSource インターフェイスに関連付けられたビュー オブジェクトのリストを表す名前のコレクションを取得します。

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

Function GetViewNames As ICollection
Dim instance As IDataSource
Dim returnValue As ICollection

returnValue = instance.GetViewNames
ICollection GetViewNames ()
ICollection^ GetViewNames ()
ICollection GetViewNames ()
function GetViewNames () : ICollection

戻り値
IDataSource に関連付けられたビューの名前が格納されている ICollection。

解説解説
使用例使用例

IDataSource インターフェイスを実装するデータ ソース コントロールで GetViewNames メソッドを実装し、名前の ICollection コレクションを返す方法を次のコード例に示します。このデータ ソースは 1 つのビューしかサポートしないため、このメソッドではビューの既定の名前を使用して 1 つの要素のコレクションを返します。このコード例は、DataSourceControl クラスのトピックで取り上げているコード例の一部分です。

   ' The ListSourceHelper class calls GetList, which
   ' calls the DataSourceControl.GetViewNames method.
   ' Override the original implementation to return
   ' a collection of one element, the default view name.
   Protected Overrides Function
 GetViewNames() As ICollection
      Dim al As New ArrayList(1)
      al.Add(CsvDataSourceView.DefaultViewName)
      Return CType(al, ICollection)
   End Function 'GetViewNames

End Class 'CsvDataSource
    // The ListSourceHelper class calls GetList, which
    // calls the DataSourceControl.GetViewNames method.
    // Override the original implementation to return
    // a collection of one element, the default view name.
    protected override ICollection GetViewNames() {
        ArrayList al = new ArrayList(1);
        al.Add(CsvDataSourceView.DefaultViewName);
        return al as ICollection;
    }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
IDataSource インターフェイス
IDataSource メンバ
System.Web.UI 名前空間
GetView
DataSourceView クラス



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

「IDataSource.GetViewNames メソッド」の関連用語

IDataSource.GetViewNames メソッドのお隣キーワード

   

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



IDataSource.GetViewNames メソッドのページの著作権

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

©2026 GRAS Group, Inc.RSS