タグで宣言されているオブジェクトの...">

HttpSessionState.StaticObjects プロパティとは何? わかりやすく解説 Weblio辞書 (original) (raw)

ASP.NET アプリケーションの Global.asax ファイル<object Runat="Server" Scope="Session"/> タグ宣言されているオブジェクトコレクション取得します

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

Visual Basic (宣言)

Public ReadOnly Property StaticObjects As HttpStaticObjectsCollection

Visual Basic (使用法)

Dim instance As HttpSessionState Dim value As HttpStaticObjectsCollection

value = instance.StaticObjects

C#

public HttpStaticObjectsCollection StaticObjects { get; }

C++

public: property HttpStaticObjectsCollection^ StaticObjects { HttpStaticObjectsCollection^ get (); }

J#

/** @property */ public HttpStaticObjectsCollection get_StaticObjects ()

JScript

public function get StaticObjects () : HttpStaticObjectsCollection

プロパティ
Global.asax ファイル宣言されオブジェクト格納されている HttpStaticObjectsCollection。

解説解説

ページオブジェクトシリアル化サポートしてない場合、および Modeプロセス範囲外にある場合 (SQLServer または StateServer)、オブジェクト作成されず、このコレクションにも追加されません。

StaticObjects プロパティは、ASP の旧バージョンとの互換性のために指定されます。

使用例使用例

StaticObjects コレクションオブジェクトidオブジェクト型一覧表示するコード例次に示します

Visual Basic

For Each de As System.Collections.DictionaryEntry In Session.StaticObjects Response.Write(String.Format("{0} is of type {1}<br />", de.Key, de.Value.GetType())) Next

C#

foreach (System.Collections.DictionaryEntry de in Session.StaticObjects) Response.Write(de.Key + " is of type " + de.Value.GetType().ToString()

プラットフォームプラットフォーム

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

開発プラットフォーム中には.NET Framework によってサポートされていないバージョンありますサポートされているバージョンについては、「システム要件」を参照してください

バージョン情報バージョン情報

.NET Framework
サポート対象 : 2.01.11.0

参照参照

関連項目
HttpSessionState クラス
HttpSessionState メンバ
System.Web.SessionState 名前空間
その他の技術情報
セッション状態概要