PagesSection.Namespaces プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > PagesSection.Namespaces プロパティの意味・解説 

PagesSection.Namespaces プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

NamespaceInfo オブジェクトコレクション取得します

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

Public ReadOnly Property
 Namespaces As NamespaceCollection
Dim instance As PagesSection
Dim value As NamespaceCollection

value = instance.Namespaces
public NamespaceCollection Namespaces { get;
 }
public:
property NamespaceCollection^ Namespaces {
    NamespaceCollection^ get ();
}
/** @property */
public NamespaceCollection get_Namespaces ()
public function get Namespaces
 () : NamespaceCollection

プロパティ
NamespaceInfo オブジェクトの NamespaceCollection。

解説解説
使用例使用例

Namespaces プロパティ使用する方法次のコード例示します

' Get the AutoImportVBNamespace property.
Console.WriteLine( _
 "AutoImportVBNamespace: '{0}'", _
 pagesSection.Namespaces.AutoImportVBNamespace)

' Set the AutoImportVBNamespace property.
pagesSection.Namespaces.AutoImportVBNamespace = True

' Get all current Namespaces in the collection.
Dim i As Int16
For i = 0 To pagesSection.Namespaces.Count
 - 1
  Console.WriteLine( _
   "Namespaces {0}: '{1}'", i, _
   pagesSection.Namespaces(i).Namespace)
Next

' Create a new NamespaceInfo object.
Dim namespaceInfo As System.Web.Configuration.NamespaceInfo
 = _
 New System.Web.Configuration.NamespaceInfo("System")

' Set the Namespace property.
namespaceInfo.Namespace = "System.Collections"

' Execute the Add Method.
pagesSection.Namespaces.Add(namespaceInfo)

' Add a NamespaceInfo object using a constructor.
pagesSection.Namespaces.Add( _
 New System.Web.Configuration.NamespaceInfo( _
 "System.Collections.Specialized"))

' Execute the RemoveAt method.
pagesSection.Namespaces.RemoveAt(0)

' Execute the Clear method.
pagesSection.Namespaces.Clear()

' Execute the Remove method.
pagesSection.Namespaces.Remove("System.Collections")

' Get the current AutoImportVBNamespace property value.
Console.WriteLine( _
 "Current AutoImportVBNamespace value: '{0}'", _
 pagesSection.Namespaces.AutoImportVBNamespace)

' Set the AutoImportVBNamespace property to false.
pagesSection.Namespaces.AutoImportVBNamespace = False
// Get the AutoImportVBNamespace property.
Console.WriteLine("AutoImportVBNamespace: '{0}'",
    pagesSection.Namespaces.AutoImportVBNamespace.ToString());

// Set the AutoImportVBNamespace property.
pagesSection.Namespaces.AutoImportVBNamespace = true;
 
// Get all current Namespaces in the collection.
for (int i = 0; i < pagesSection.Namespaces.Count;
 i++)
{
  Console.WriteLine(
      "Namespaces {0}: '{1}'", i,
      pagesSection.Namespaces[i].Namespace);
}

// Create a new NamespaceInfo object.
System.Web.Configuration.NamespaceInfo namespaceInfo =
    new System.Web.Configuration.NamespaceInfo("System");

// Set the Namespace property.
namespaceInfo.Namespace = "System.Collections";

// Execute the Add Method.
pagesSection.Namespaces.Add(namespaceInfo);

// Add a NamespaceInfo object using a constructor.
pagesSection.Namespaces.Add(
    new System.Web.Configuration.NamespaceInfo(
    "System.Collections.Specialized"));

// Execute the RemoveAt method.
pagesSection.Namespaces.RemoveAt(0);

// Execute the Clear method.
pagesSection.Namespaces.Clear();

// Execute the Remove method.
pagesSection.Namespaces.Remove("System.Collections");

// Get the current AutoImportVBNamespace property value.
Console.WriteLine(
    "Current AutoImportVBNamespace value: '{0}'",
    pagesSection.Namespaces.AutoImportVBNamespace);

// Set the AutoImportVBNamespace property to false.
pagesSection.Namespaces.AutoImportVBNamespace = false;
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
PagesSection クラス
PagesSection メンバ
System.Web.Configuration 名前空間
NamespaceCollection クラス
NamespaceInfo クラス
その他の技術情報
import ステートメント



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

辞書ショートカット

すべての辞書の索引

「PagesSection.Namespaces プロパティ」の関連用語

PagesSection.Namespaces プロパティのお隣キーワード
検索ランキング

   

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



PagesSection.Namespaces プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS