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

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

HttpApplicationState.RemoveAt メソッド

HttpApplicationState オブジェクトコレクションからインデックス使用して削除します

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

Public Sub RemoveAt ( _
    index As Integer _
)
Dim instance As HttpApplicationState
Dim index As Integer

instance.RemoveAt(index)
public void RemoveAt (
    int index
)
public:
void RemoveAt (
    int index
)
public void RemoveAt (
    int index
)

パラメータ

index

削除される項目のコレクション内の位置

使用例使用例

2 つアプリケーション変数コレクション挿入しRemoveAt メソッド使用してカスタム HttpApplicationState オブジェクト最初変数削除する方法コード例次に示します

<%@ Page language="VB" AutoEventWireup="true"
 %>
<HTML>
  <HEAD>
    <title>HttpApplicationState - RemoveAt - VB.NET Example</title>
    <script runat="server">
      Sub Page_Load(sender As Object,
 e As EventArgs)

          ' Add two new application state variables.
          Application.Add("City", "Redmond")
          Application.Add("State", "WA")
        
          ' Show the contents of both application state variables.
          Label1.Text = "Application.Keys(0) contains: "
 & Application.Keys(0).ToString()
          Label1.Text += "<BR>Application.Keys(1) contains:
 " & Application.Keys(1).ToString()
              
          ' Remove the City application state variable, which is at
          ' the first index location.
          Application.RemoveAt(0)
          Label2.Text = "<BR>Call:&nbsp; Application.RemoveAt(0)"
              
          ' Show the contents of the application state variable,
          ' in the first index location, which is now the State variable.
          Label3.Text = "<BR>Application.Keys(0) contains:
 " & Application.Keys(0).ToString()
      End Sub
    </script>
  </HEAD>
  <body>
    <form id="Form1" method="post"
 runat="server">
            <h3>HttpApplicationState - RemoveAt - VB.NET Example</h3>
      <asp:Label id="Label1" runat="server"
 /><br>
      <asp:Label id="Label2" runat="server"
 /><br>
      <asp:Label id="Label3" runat="server"
 />
    </form>
  </body>
</HTML>
<%@ Page language="c#" AutoEventWireup="true"
 %>
<HTML>
  <HEAD>
    <title>HttpApplicationState - RemoveAt - C# Example</title>
    <script runat="server">
      void Page_Load(Object sender, EventArgs e) 
      {
          // Add two new application state variables.
          Application.Add("City", "Redmond");
          Application.Add("State", "WA");
        
          // Show the contents of both application state variables.
          Label1.Text = "Application.Keys[0] contains: " + Application.Keys[0].ToString();
          Label1.Text += "<BR>Application.Keys[1] contains: " + Application.Keys[1].ToString();
              
          // Remove the City application state variable, which is at
          // the first index location.
          Application.RemoveAt(0);
          Label2.Text = "<BR>Call:&nbsp; Application.RemoveAt(0)";
              
          // Show the contents of the application state variable,
          // in the first index location, which is now the State variable.
          Label3.Text = "<BR>Application.Keys[0] contains: " + Application.Keys[0].ToString();
      }
    </script>
  </HEAD>
  <body>
    <form id="Form1" method="post" runat="server">
            <h3>HttpApplicationState - RemoveAt - C# Example</h3>
      <asp:Label id="Label1" runat="server" /><br>
      <asp:Label id="Label2" runat="server" /><br>
      <asp:Label id="Label3" runat="server" />
    </form>
  </body>
</HTML>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
HttpApplicationState クラス
HttpApplicationState メンバ
System.Web 名前空間


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

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

辞書ショートカット

すべての辞書の索引

HttpApplicationState.RemoveAt メソッドのお隣キーワード
検索ランキング

   

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



HttpApplicationState.RemoveAt メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS