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

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

SiteMapNodeCollection.Item プロパティ

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

コレクション内の指定したインデックスでの SiteMapNode オブジェクト取得または設定します

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

Public Overridable Default
 Property Item ( _
    index As Integer _
) As SiteMapNode
Dim instance As SiteMapNodeCollection
Dim index As Integer
Dim value As SiteMapNode

value = instance(index)

instance(index) = value
public virtual SiteMapNode this [
    int index
] { get; set; }
public:
virtual property SiteMapNode^ default [int]
 {
    SiteMapNode^ get (int index);
    void set (int index,
 SiteMapNode^ value);
}
/** @property */
public SiteMapNode get_Item (int index)

/** @property */
public void set_Item (int
 index, SiteMapNode value)

パラメータ

index

検索する SiteMapNode のインデックス

プロパティ
SiteMapNodeCollection の要素を表す SiteMapNode

例外例外
例外種類条件

NotSupportedException

SiteMapNodeCollection読み取り専用です。

ArgumentOutOfRangeException

index が 0 未満です。

または

indexCount より大きい値です。

ArgumentNullException

設定側に指定された値が null 参照 (Visual Basic では Nothing) です。

解説解説
使用例使用例

Item インデクサ使用してSiteMapNode オブジェクトSiteMapNodeCollection コレクションから取得する方法次のコード例示します。この例では、SiteMapNode オブジェクトが、Remove メソッド使用して内部配列の第 2 要素位置から削除されAdd メソッド使用して配列末尾追加されます。SiteMapNode オブジェクトを、配列末尾追加するではなく特定のインデックス位置挿入するには、Insert メソッド使用します

' Move a node from one spot in the list to another.
Try
    Response.Write("Original node order: <BR>")
    Dim node As SiteMapNode
    For Each node In nodes
        Response.Write( node.Title & "<BR>")
    Next

    Dim aNode As SiteMapNode = nodes(1)

    Response.Write("Adding " & aNode.Title &
 " to the end of the collection.<BR>")
    nodes.Add(aNode)

    Response.Write("Removing " & aNode.Title &
 " at position 1. <BR>")
    nodes.Remove(nodes(1))

    Response.Write("New node order: <BR>")

    For Each node In nodes
        Response.Write( node.Title & "<BR>")
    Next

Catch nse As NotSupportedException
    Response.Write("NotSupportedException caught.<BR>")
End Try
// Move a node from one spot in the list to another.
try {
    Response.Write("Original node order: <BR>");
    foreach (SiteMapNode node in nodes) {
        Response.Write( node.Title + "<BR>");
    }
    SiteMapNode aNode = nodes[1];

    Response.Write("Adding " + aNode.Title + " to the end of the collection.<BR>");
    nodes.Add(aNode);

    Response.Write("Removing " + aNode.Title + " at position 1. <BR>");
    nodes.Remove(nodes[1]);

    Response.Write("New node order: <BR>");
    foreach (SiteMapNode node in nodes) {
        Response.Write( node.Title + "<BR>");
    }
}
catch (NotSupportedException nse) {
    Response.Write("NotSupportedException caught.<BR>");
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SiteMapNodeCollection クラス
SiteMapNodeCollection メンバ
System.Web 名前空間
IndexOf
Contains


このページでは「.NET Framework クラス ライブラリ リファレンス」からSiteMapNodeCollection.Item プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からSiteMapNodeCollection.Item プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からSiteMapNodeCollection.Item プロパティ を検索

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

辞書ショートカット

すべての辞書の索引

「SiteMapNodeCollection.Item プロパティ」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS