<html><head>		<META http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" href="josh.css"></head><body bgcolor="#FFFFFF"><div id="Count">
			<table width="100%" cellspacing="0" cellpadding="0" border="0" class="main"><tr>							<td valign="top" class="name">Count</td>
					<td valign="top" nowrap class="compatibility" />
				</tr>
				<tr>
					<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">Integer = Application.Count</p>
					</td><td valign="top" nowrap class="requirements"> &#160;</td>
				</tr>
				<tr><td colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<tr>
							<td><p>Application コレクションに現在格納されている項目の数を保持する整数を返します。<span class="literal">HttpApplicationState</span> クラスによって実装されている Count メンバーは、ICollection インターフェイスから派生しています。
</p>
							</td>
						</tr>
						<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
						</tr>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">パラメータ</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td>
						<ul><li><i><span class="replaceable">Integer</span></i><br>&#160;
						  Count プロパティの値を受け取る整数変数です。</li></ul>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">例</span></td>
				</tr>
				<tr>
					<td><p>次の例では、Application コレクションに 2 つの値を追加し、Application コレクションの項目数を表示します。次に、Count プロパティをループ制御値として使用し、各項目を表示します。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>Sub Page_Load(  )
   Application.Clear(  )
   Application("foo") = "Hello, "
   Application("bar") = "World!"
   Message.Text = "The Application collection contains " &amp; _
      Application.Count &amp; " items: "
      Dim I as Integer
      For I = 0 To Application.Count - 1
         Message.Text &amp;= Application(I)
      Next
End Sub</pre>
						</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">メモ</span></td>
				</tr>
				<tr>
					<td><p>Count プロパティは ASP.NET で新たに導入されました。Count プロパティでは、Application コレクションをループする以外に、特定の時点において Application コレクションに格納されている項目の数を追跡することができます。たとえば、後で参照するためにその項目数をログに記録できます。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
			</table>
		</div><div id="Item">
			<table width="100%" cellspacing="0" cellpadding="0" border="0" class="main"><tr>							<td valign="top" class="name">Item</td>
					<td valign="top" nowrap class="compatibility" />
				</tr>
				<tr>
					<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">Object = Application.Item(ByVal name As String)<br>
					Application.Item(ByVal name As String) = Object<br>
					Object = Application.Item(ByVal index As Integer)<br>
					Application.Item(ByVal index As Integer) = Object
</p>
					</td><td valign="top" nowrap class="requirements"> &#160;</td>
				</tr>
				<tr><td colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<tr>
							<td><p>特定の名前またはインデックスに関連付けられているオブジェクトを返すか、または設定します。
</p>
							</td>
						</tr>
						<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
						</tr>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">パラメータ</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td>
						<ul><li><i><span class="replaceable">Object</span></i><br>&#160;
						  項目の値を受け取るか設定する変数です。.NET のすべてのタイプは最終的に Object から派生しているので、任意のタイプを指定できます。
</li><li><i><span class="replaceable">name</span></i><br>&#160;
						  項目に割り当てる、または項目の取得に使用するテキストキーを保持する文字列パラメータです。
</li><li><i><span class="replaceable">index</span></i><br>&#160;
						  値を取得または変更する項目のインデックスを保持する整数パラメータです。
</li></ul>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">例</span></td>
				</tr>
				<tr>
					<td><p>次の例では、Application コレクションの 2 つの項目の値を設定します。これらの項目がコレクションに存在しない場合は追加されます。次に、2 つの値が表示されます。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>Sub Page_Load(  )
   Application.Clear(  )
   Application.Item("foo") = "foo"
   Application.Item("foo2") = "foo2"
   Message.Text = Application.Item("foo") &amp; "&lt;br/&gt;"
   Message.Text &amp;= Application.Item(1)
End Sub</pre>
						</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">メモ</span></td>
				</tr>
				<tr>
					<td><p>次の構文を使用すると、黙示的に Item プロパティにアクセスします。</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>Application("foo") = "foo"</pre>
						</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><p>この構文は、従来の ASP コードでよく使用されています。Item プロパティは明示的に参照する必要はありません。ただし、黙示的にアクセスするよりも明記した方がコードが読みやすく、理解しやすいものになります。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><p>インデックスを使用できるのは、値を変更するときのパラメータとして使用する場合に限ります。新しい項目の作成には使用できません。また、インデックスは、Application コレクションの項目数を超えてはいけません。項目数を超えるインデックスに対しては、例外が発生します。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
			</table>
		</div><div id="AllKeys">
			<table width="100%" cellspacing="0" cellpadding="0" border="0" class="main"><tr>							<td valign="top" class="name">AllKeys</td>
					<td valign="top" nowrap class="compatibility" />
				</tr>
				<tr>
					<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">Dim StateVars(Application.Count) As String<br>
					StateVars = Application.AllKeys</p>
					</td><td valign="top" nowrap class="requirements"> &#160;</td>
				</tr>
				<tr><td colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<tr>
							<td><p>HttpApplicationState オブジェクトに格納されているキー名の文字列配列を返します。
</p>
							</td>
						</tr>
						<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
						</tr>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">パラメータ</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td>
						<ul><li><i><span class="replaceable">StateVars</span></i><br>&#160;
						  キー名の配列を受け取る String タイプの配列の変数です。
</li></ul>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">例</span></td>
				</tr>
				<tr>
					<td><p>次の例では、Application オブジェクトに格納されているデータのすべてのキーを表示します。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>Sub Page_Load(  )
   Dim I as Integer
   Dim StateVars(Application.Count - 1) As String
   StateVars = Application.AllKeys
   For I = 0 to StateVars.Length - 1
      Message.Text = Message.Text + StateVars(I) + "&lt;br/&gt;"
   Next I
End Sub </pre>
						</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">メモ</span></td>
				</tr>
				<tr>
					<td><p>このプロパティからは、現在のすべての Application 変数に割り当てられているキー名の一覧が返されます。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
			</table>
		</div><div id="Contents">
			<table width="100%" cellspacing="0" cellpadding="0" border="0" class="main"><tr>							<td valign="top" class="name">Contents</td>
					<td valign="top" nowrap class="compatibility" />
				</tr>
				<tr>
					<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">HttpApplicationState = Application.Contents</p>
					</td><td valign="top" nowrap class="requirements"> &#160;</td>
				</tr>
				<tr><td colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<tr>
							<td><p>現在の HttpApplicationState インスタンスへの参照を返します。
</p>
							</td>
						</tr>
						<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
						</tr>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">パラメータ</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td>
						<ul><li><i><span class="replaceable">HttpApplicationState</span></i><br>&#160;
						  Contents 参照を受け取る HttpApplicaitonState タイプの変数です。
</li></ul>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">例</span></td>
				</tr>
				<tr>
					<td><p>次の例では、Contents コレクション参照から RemoveAll メソッドを呼び出し、メッセージを書き込みます。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>Sub Page_Load(  )
Application.Contents.RemoveAll(  )
Message.Text = "Removed all items from current Application."
End Sub</pre>
						</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">メモ</span></td>
				</tr>
				<tr>
					<td><p>このプロパティは、従来の ASP との下位互換性を保つために提供されています。従来の ASP では、Item プロパティなどのプロパティ、Remove メソッドや RemoveAll メソッドなどのメソッドには Contents プロパティからアクセスします。新しく開発された ASP.NET では、これらのメンバーに直接アクセスする必要があります。たとえば、Contents プロパティを経由して RemoveAll メソッドを呼び出すのではなく、直接 RemoveAll メソッドを呼び出すことができます。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>Application.RemoveAll(  )</pre>
						</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
			</table>
		</div><div id="Keys">
			<table width="100%" cellspacing="0" cellpadding="0" border="0" class="main"><tr>							<td valign="top" class="name">Keys</td>
					<td valign="top" nowrap class="compatibility" />
				</tr>
				<tr>
					<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">KeysCollection = Application.Keys</p>
					</td><td valign="top" nowrap class="requirements"> &#160;</td>
				</tr>
				<tr><td colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<tr>
							<td><p>Application コレクションに格納されているすべての値に関連付けられている文字列キーを保持する NameObjectCollectionBase.KeysCollection を返します。
</p>
							</td>
						</tr>
						<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
						</tr>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">パラメータ</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td>
						<ul><li><i><span class="replaceable">KeysCollection</span> </i><br>&#160;
						  Keys プロパティの値を受け取る NameObjectCollectionBase.KeysCollection タイプの変数です。
</li></ul>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">例</span></td>
				</tr>
				<tr>
					<td><p>次の例では、Application コレクションのキーのコレクション全体をループし、キー名とキー名に関連付けられている値を表示します。表示には Message コントロールの Text プロパティを使用します。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>Sub Page_Load(  )
   Dim Key As String
   Message.Text = "Application Keys:"
   For Each Key in Application.Keys
      Message.Text &amp;= "&lt;br/&gt;Key:&amp;&#160;;&amp;&#160;;&amp;&#160;;" &amp; Key
      Message.Text &amp;= "&lt;br/&gt;Value:&amp;&#160;;&amp;&#160;;&amp;&#160;;" &amp; Application(Key)
   Next
End Sub</pre>
						</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">メモ</span></td>
				</tr>
				<tr>
					<td><p>Application コレクションのコンテンツに繰り返し処理を実行する方法は多数ありますが、その 1 つが Keys プロパティを使用する方法です。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
			</table>
		</div><div id="StaticObjects">
			<table width="100%" cellspacing="0" cellpadding="0" border="0" class="main"><tr>							<td valign="top" class="name">StaticObjects</td>
					<td valign="top" nowrap class="compatibility" />
				</tr>
				<tr>
					<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">HttpStaticObjectsCollection = Application.StaticObjects
</p>
					</td><td valign="top" nowrap class="requirements"> &#160;</td>
				</tr>
				<tr><td colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<tr>
							<td><p><span class="literal">scope</span> 属性が <span class="literal">Application</span> に設定された <span class="literal">&lt;object runat="server"&gt;</span> 構文を使用して "<span class="emphasis">global.asax</span>" でインスタンス化されているすべてのオブジェクトを保持する HttpStaticObjectsCollection を返します。
</p>
							</td>
						</tr>
						<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
						</tr>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">パラメータ</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td>
						<ul><li><i><span class="replaceable">HttpStaticObjectsCollection</span> </i><br>&#160;
						  StaticObjects プロパティの値を受け取る HttpStaticObjectsCollection タイプの変数です。
</li></ul>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">例</span></td>
				</tr>
				<tr>
					<td><p>次の例では、<span class="literal">HttpStaticObjectsCollection</span> クラスの Count プロパティを使用して、"<span class="emphasis">global.asax</span>" の <span class="literal">&lt;object scope="Application" runat="server"/&gt;</span> 構文で宣言されているオブジェクトのうち、現在のアプリケーションに存在するオブジェクト数を表示します。次に、それぞれのオブジェクトのタイプを調べ、Web TextBox コントロールがあれば現在のページの Controls コレクションに追加します。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>Sub Page_Load(  )
   Message.Text = "There are " &amp; Application.StaticObjects.Count &amp; _
      " objects declared with the " &amp; _
      "&amp;lt;object runat=&amp;quot;server&amp;quot;&amp;gt; syntax " &amp; _
      "in Application scope."
   Dim myobj As Object
   For Each myObj in Application.StaticObjects
      If myObj.Value.GetType.ToString(  ) = _
         "System.Web.UI.WebControls.TextBox" Then
         Page.Controls.Add(myObj.Value)
      End If
   Next
End Sub</pre>
						</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">メモ</span></td>
				</tr>
				<tr>
					<td><p>このプロパティは、従来の ASP との下位互換性を保つために提供されています。オブジェクトのスコープをセッションまたはアプリケーションに設定すると、リソースの使用率やアプリケーションのスケーラビリティに影響を及ぼすので、インスタンス化の前には十分な検討が必要です。基本的には、オブジェクトをページスコープに限定することをお勧めします。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><p>コレクション内の各オブジェクトは DictionaryEntry 構造で表現されるので、キーおよび値に直接アクセスすることはできません。キーおよび値にアクセスするには、DictionaryEntry 構造の Key メンバーおよび Value メンバーを使用します。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
			</table>
		</div><div id="Add">
			<table width="100%" cellspacing="0" cellpadding="0" border="0" class="main"><tr>							<td valign="top" class="name">Add</td>
					<td valign="top" nowrap class="compatibility" />
				</tr>
				<tr>
					<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">Application.Add(ByVal name As String, ByVal value As Object)
</p>
					</td><td valign="top" nowrap class="requirements"> &#160;</td>
				</tr>
				<tr><td colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<tr>
							<td><p>Application コレクションに値を追加します。</p>
							</td>
						</tr>
						<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
						</tr>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">パラメータ</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td>
						<ul><li><i><span class="replaceable">Name</span></i><br>&#160;
						  Application コレクションに追加する項目の名前を指定する String タイプの変数です。
</li><li><i><span class="replaceable">Value</span></i><br>&#160;
						  Application コレクションに追加する項目の値を保持する Object タイプの変数です。
</li></ul>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">例</span></td>
				</tr>
				<tr>
					<td><p>次の例では、項目を Application コレクションに追加して、表示します。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>Sub Page_Load(  )
   Application.Add("Added", "AddedValue")
   Message.Text = Application("Added")
End Sub</pre>
						</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">メモ</span></td>
				</tr>
				<tr>
					<td><p>Add メソッドは ASP.NET で新しく導入されました。このメソッドで Application コレクションに項目を追加する技法は、他の .NET コレクションに項目を追加するときに使用される技法と一貫しています。また、インデックスのキー名を使用して Application オブジェクトを直接指定する、従来の ASP の構文も正常に機能します。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
			</table>
		</div><div id="Clear">
			<table width="100%" cellspacing="0" cellpadding="0" border="0" class="main"><tr>							<td valign="top" class="name">Clear</td>
					<td valign="top" nowrap class="compatibility" />
				</tr>
				<tr>
					<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">Application.Clear(  )</p>
					</td><td valign="top" nowrap class="requirements"> &#160;</td>
				</tr>
				<tr><td colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<tr>
							<td><p>Application コレクションのコンテンツをクリアします。
</p>
							</td>
						</tr>
						<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
						</tr>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">パラメータ</span></td>
				</tr>
				<tr>
					<td><p>なし</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">例</span></td>
				</tr>
				<tr>
					<td><p>次の例では、Application コレクションのコンテンツをクリアし、Message コントロールの Text プロパティにメッセージを書き込みます。このメッセージに含まれるコレクションの現在のカウンターは 0 になります。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>Sub Page_Load(  )
   Application.Clear(  )
   Message.Text = "There are " &amp; Application.Count &amp; _
      " items in the Application collection."
End Sub</pre>
						</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">メモ</span></td>
				</tr>
				<tr>
					<td><p>Clear メソッドは ASP.NET で新しく導入されました。このメソッドは Application コレクション自体のコンテンツのみをクリアします。StaticObjects コレクションのコンテンツはクリアしません。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
			</table>
		</div><div id="Get">
			<table width="100%" cellspacing="0" cellpadding="0" border="0" class="main"><tr>							<td valign="top" class="name">Get</td>
					<td valign="top" nowrap class="compatibility" />
				</tr>
				<tr>
					<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">Application.Get(ByVal name As String)<br>
					Application.Get(ByVal Index As Integer)</p>
					</td><td valign="top" nowrap class="requirements"> &#160;</td>
				</tr>
				<tr><td colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<tr>
							<td><p>Application コレクションの要素を、名前またはコレクション内での順序 (インデックス) のいずれかによって取得します。一般的には、ループ内でコレクションのメンバーを取得する必要がない限り、Get への呼び出しでは名前を使用します。
</p>
							</td>
						</tr>
						<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
						</tr>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">パラメータ</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td>
						<ul><li><i><span class="replaceable">name</span></i><br>&#160;
						  Application コレクションから取得する項目の名前を指定する String タイプの変数です。
</li><li><i><span class="replaceable">Index</span></i><br>&#160;
						  Application コレクションから取得する項目のインデックスを指定する Integer タイプの変数です。
</li></ul>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">例</span></td>
				</tr>
				<tr>
					<td><p>次の例では、Application コレクションの値を設定して取得します。また、Get メソッドを使用して、Message コントロールの Text プロパティにメッセージを書き込みます。このメッセージには、Application コレクションに新しく追加された要素の現在の値が含まれます。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>Sub Page_Load(  )
   Application("GetTest") = "Got it!"
   Message.Text = "GetTest = " &amp; Application.Get("GetTest")
End Sub</pre>
						</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">メモ</span></td>
				</tr>
				<tr>
					<td><p>次のコードに示すように、値が null でないことを確認することで、名前付き値が Application コレクションに保存されているかどうかを調べることができます。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>If Not Application("Foo") is Nothing then
   Message.Text = "Foo is set to " &amp; Application.Get("Foo")
End If</pre>
						</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
			</table>
		</div><div id="GetKey">
			<table width="100%" cellspacing="0" cellpadding="0" border="0" class="main"><tr>							<td valign="top" class="name">GetKey</td>
					<td valign="top" nowrap class="compatibility" />
				</tr>
				<tr>
					<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">Application.GetKey(ByVal Index As Integer)</p>
					</td><td valign="top" nowrap class="requirements"> &#160;</td>
				</tr>
				<tr><td colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<tr>
							<td><p>Application オブジェクトに格納されているデータ項目のインデックスに対応するキー名を取得します。
</p>
							</td>
						</tr>
						<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
						</tr>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">パラメータ</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td>
						<ul><li><i><span class="replaceable">Index</span></i><br>&#160;
						  Application コレクションから取得するキーのインデックスを指定する Integer タイプの変数です。
</li></ul>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">例</span></td>
				</tr>
				<tr>
					<td><p>次の例では、既知の状態に戻すために Application コレクションからすべての値を削除します。次に、Application コレクションに値を 1 つ書き込みます。最後に、GetKey を呼び出して取得した最初の要素 (インデックス 0) のキーを Message コントロールに格納します。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>Sub Page_Load(  )
   Application.RemoveAll(  )
   Application("GetKeyTest") = "Got it!"
   Message.Text = "Key of Application(0) = " &amp; _
                   Application.GetKey(0) &amp; _
                   "&lt;br/&gt;(Should be GetKeyTest)"
End Sub</pre>
						</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">メモ</span></td>
				</tr>
				<tr>
					<td><p><span class="replaceable">Index</span> が 0 未満、または Application.Count 以上の場合、ArgumentOutOfRangeException 例外が発生します。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
			</table>
		</div><div id="Lock">
			<table width="100%" cellspacing="0" cellpadding="0" border="0" class="main"><tr>							<td valign="top" class="name">Lock</td>
					<td valign="top" nowrap class="compatibility" />
				</tr>
				<tr>
					<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">Application.Lock</p>
					</td><td valign="top" nowrap class="requirements"> &#160;</td>
				</tr>
				<tr><td colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<tr>
							<td><p>アクセスを同期するため、Application コレクションへのアクセスをロックします。</p>
							</td>
						</tr>
						<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
						</tr>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">パラメータ</span></td>
				</tr>
				<tr>
					<td><p>なし</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">例</span></td>
				</tr>
				<tr>
					<td><p>次の例では、アプリケーションをロックして、アプリケーションページのロードカウンタ変数を設定します。次に、アプリケーションのロックを解除し、値を表示します。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>Sub Page_Load(  )
   Application.Lock(  )
   Application("Counter") = Application("Counter") + 1
   Application.UnLock(  )
   Message.Text = "Counter = " &amp; Application("Counter")
End Sub</pre>
						</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">メモ</span></td>
				</tr>
				<tr>
					<td><p>上の例では、アプリケーションをロックし、Application コレクション内部の値を変更する操作を実行して、アプリケーションのロックをできるだけ早く解除します。Lock および UnLock メソッドの呼び出しの外部では、Application コレクションの読み取りアクセスを安全に行うことができます。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
			</table>
		</div><div id="Remove">
			<table width="100%" cellspacing="0" cellpadding="0" border="0" class="main"><tr>							<td valign="top" class="name">Remove</td>
					<td valign="top" nowrap class="compatibility" />
				</tr>
				<tr>
					<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">Application.Remove(ByVal name As String)</p>
					</td><td valign="top" nowrap class="requirements"> &#160;</td>
				</tr>
				<tr><td colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<tr>
							<td><p>Application コレクションから、名前で指定した項目を削除します。
</p>
							</td>
						</tr>
						<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
						</tr>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">パラメータ</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td>
						<ul><li><i><span class="replaceable">name</span></i><br>&#160;
						  削除する項目の名前またはキーを保持する文字列パラメータです。</li></ul>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">例</span></td>
				</tr>
				<tr>
					<td><p>次の例では、キー "foo" が付いた項目が Application コレクションに存在するかどうかを判断し、存在が確認された場合は項目を削除して適切なメッセージを表示します。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>Sub Page_Load(  )
   If Not Application("foo") Is Nothing Then
      Application.Remove("foo")
      Message.Text = "Item 'foo' was removed."
   Else
      Message.Text = "Item 'foo' does not exist."
   End If
End Sub</pre>
						</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">メモ</span></td>
				</tr>
				<tr>
					<td><p>Remove メソッドは、従来の ASP との下位互換性を保つために提供されています。従来の ASP では、Contents コレクションを経由してこのメソッドにアクセスしました。既に説明したように、ASP.NET では、このメソッドに直接アクセスするか、または Contents コレクション経由でアクセスできます。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
			</table>
		</div><div id="RemoveAll">
			<table width="100%" cellspacing="0" cellpadding="0" border="0" class="main"><tr>							<td valign="top" class="name">RemoveAll</td>
					<td valign="top" nowrap class="compatibility" />
				</tr>
				<tr>
					<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">Application.RemoveAll(  )</p>
					</td><td valign="top" nowrap class="requirements"> &#160;</td>
				</tr>
				<tr><td colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<tr>
							<td><p>Application コレクションからすべての項目を削除します。
</p>
							</td>
						</tr>
						<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
						</tr>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">パラメータ</span></td>
				</tr>
				<tr>
					<td><p>なし</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">例</span></td>
				</tr>
				<tr>
					<td><p>次の例では、Application コレクションにおける項目の有無を調べ、存在が確認された場合は RemoveAll メソッドを呼び出してコレクションをクリアします。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>Sub Page_Load(  )
   If Application.Count &gt; 0 Then
      Application.RemoveAll(  )
      Message.Text = "Application collection cleared."
   Else
      Message.Text = "Application collection is already empty."
   End If
End Sub</pre>
						</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">メモ</span></td>
				</tr>
				<tr>
					<td><p>RemoveAll メソッドは、従来の ASP との下位互換性を保つために提供されています。従来の ASP では、Contents コレクションを経由してこのメソッドにアクセスしました。既に説明したように、ASP.NET では、このメソッドに直接アクセスするか、または Contents コレクション経由でアクセスできます。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
			</table>
		</div><div id="RemoveAt">
			<table width="100%" cellspacing="0" cellpadding="0" border="0" class="main"><tr>							<td valign="top" class="name">RemoveAt</td>
					<td valign="top" nowrap class="compatibility" />
				</tr>
				<tr>
					<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">Application.RemoveAt(ByVal index As Integer)
</p>
					</td><td valign="top" nowrap class="requirements"> &#160;</td>
				</tr>
				<tr><td colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<tr>
							<td><p>Application コレクションから、インデックスで指定した項目を削除します。新たに導入されたこのメソッドは、キーで項目を削除する Remove メソッドと対になります。
</p>
							</td>
						</tr>
						<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
						</tr>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">パラメータ</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td>
						<ul><li><i><span class="replaceable">index</span></i><br>&#160;
						  Application コレクションから削除する項目のインデックス位置を保持する整数パラメータです。
</li></ul>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">例</span></td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>Sub Page_Load(  )
   If Application.Count &gt; 0 Then
      Application.RemoveAt(0)
      Message.Text = "The item at index 0 was removed."
   Else
      Message.Text = "The item at index 0 does not exist."
   End If
End Sub</pre>
						</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">メモ</span></td>
				</tr>
				<tr>
					<td><p>RemoveAt メソッドを使用すると、キーではなくインデックスを使用して Application コレクションの項目を削除できます。上の例で示したように、項目を削除すると、削除された項目の後の項目の位置がコレクション内で 1 つ移動します。インデックスを使用して項目を削除した後で、同じインデックスに対して RemoveAt をもう一度呼び出すと、最初に削除した項目のすぐ次の項目が削除されます。Application コレクションにある項目が 1 つだけの場合に RemoveAt を再度呼び出すと、ArgumentOutOfRangeException 例外が発生します。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
			</table>
		</div><div id="Set">
			<table width="100%" cellspacing="0" cellpadding="0" border="0" class="main"><tr>							<td valign="top" class="name">Set</td>
					<td valign="top" nowrap class="compatibility" />
				</tr>
				<tr>
					<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">Application.Set(ByVal name As String, ByVal value As Object)
</p>
					</td><td valign="top" nowrap class="requirements"> &#160;</td>
				</tr>
				<tr><td colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<tr>
							<td><p>Application コレクションのオブジェクトの値を更新します。この新しいメソッドにより、Application コレクションにオブジェクトを設定できるようになりました。
</p>
							</td>
						</tr>
						<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
						</tr>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">パラメータ</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td>
						<ul><li><i><span class="replaceable">Name</span></i><br>&#160;
						  Application コレクションにある更新対象のオブジェクトの名前を保持する文字列パラメータです。
</li><li><i><span class="replaceable">Value</span></i><br>&#160;
						  Application コレクションにある更新対象のオブジェクトの新しい値を保持するオブジェクトパラメータです。
</li></ul>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">例</span></td>
				</tr>
				<tr>
					<td><p>次の例では、Application コレクションに新しい項目を設定するときと、その値を変更するときの計 2 回 Set を使用します。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>Sub Page_Load(  )
   Application.RemoveAll(  )
   Application.Set("TotallyNewVariable","Test!")
   Message.Text = "First: " + Application("TotallyNewVariable") + "&lt;br/&gt;"
   Application.Set("TotallyNewVariable","Test again!")
   Message.Text = Message.Text &amp; "First after Set: " +
   Application("TotallyNewVariable") + "&lt;br/&gt;"
End Sub</pre>
						</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">メモ</span></td>
				</tr>
				<tr>
					<td><p>Set を使用して Application コレクションに値を追加することもできますが、通常は従来の ASP から使い慣れている単純な構文を使用します。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>Application("TotallyNewVariable") = "Test!"</pre>
						</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
			</table>
		</div><div id="UnLock">
			<table width="100%" cellspacing="0" cellpadding="0" border="0" class="main"><tr>							<td valign="top" class="name">UnLock</td>
					<td valign="top" nowrap class="compatibility" />
				</tr>
				<tr>
					<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">Application.UnLock</p>
					</td><td valign="top" nowrap class="requirements"> &#160;</td>
				</tr>
				<tr><td colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<tr>
							<td><p>アクセスを同期するため、Application コレクションへのアクセスのロックを解除します。
</p>
							</td>
						</tr>
						<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
						</tr>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">パラメータ</span></td>
				</tr>
				<tr>
					<td><p>なし</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">例</span></td>
				</tr>
				<tr>
					<td><p>次の例では、アプリケーションをロックして、アプリケーションページのロードカウンタ変数を設定します。次に、アプリケーションのロックを解除し、値を表示します。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>Sub Page_Load(  )
   Application.Lock(  )
   Application("Counter") = Application("Counter") + 1
   Application.UnLock(  )
   Message.Text = "Counter = " &amp; Application("Counter")
End Sub</pre>
						</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">メモ</span></td>
				</tr>
				<tr>
					<td><p>上の例では、アプリケーションをロックし、Application コレクション内部の値を変更する操作を実行して、アプリケーションのロックをできるだけ早く解除します。Lock および UnLock メソッドの呼び出しの外部では、Application コレクションの読み取りアクセスを安全に行うことができます。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
			</table>
		</div><div id="Start">
			<table width="100%" cellspacing="0" cellpadding="0" border="0" class="main"><tr>							<td valign="top" class="name">Start</td>
					<td valign="top" nowrap class="compatibility" />
				</tr>
				<tr>
					<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">Sub Application_OnStart( ) 'イベントハンドラーのロジック<br>
					End Sub</p>
					</td><td valign="top" nowrap class="requirements"> &#160;</td>
				</tr>
				<tr><td colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<tr>
							<td><p>Application が作成されたときに発生します。このイベントのイベントハンドラーは、"<span class="emphasis">global.asax</span>" アプリケーションファイルで定義する必要があります。
</p>
							</td>
						</tr>
						<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
						</tr>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">パラメータ</span></td>
				</tr>
				<tr>
					<td><p>なし</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">例</span></td>
				</tr>
				<tr>
					<td><p>次の例では、アプリケーションイベントログとアプリケーション用 IIS ログの両方に、start イベントが発生したことを示すエントリを書き込みます。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>&lt;Script language="VB" runat="server"&gt;
   Sub Application_OnStart(  )
      Dim EventLog1 As New System.Diagnostics.EventLog ("Application", _
         ".", "mySource")
      EventLog1.WriteEntry("Application_OnStart fired!")
      Context.Response.AppendToLog("Application_OnStart fired!")
   End Sub
&lt;/script&gt;</pre>
						</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><p>上のコードには 1 つ問題点があります。.NET Framework の新しいバージョンではセキュリティが強化されているため、ASP.NET アプリケーションではデフォルトでイベントログへの書き込みができません。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">メモ</span></td>
				</tr>
				<tr>
					<td><p>アプリケーションを初期化するときは、初期化作業に start イベントを使うと便利です。ほとんどが静的な Application 変数を初期化できます。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
			</table>
		</div><div id="End">
			<table width="100%" cellspacing="0" cellpadding="0" border="0" class="main"><tr>							<td valign="top" class="name">End</td>
					<td valign="top" nowrap class="compatibility" />
				</tr>
				<tr>
					<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
				</tr>
				<tr>
					<td valign="top" nowrap class="usage"><p class="literal">Sub Application_OnEnd(  ) 'イベントハンドラーのロジック<br>
					End Sub</p>
					</td><td valign="top" nowrap class="requirements"> &#160;</td>
				</tr>
				<tr><td colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2" class="description">
						<tr>
							<td><p>Web サーバーが停止するか "<span class="emphasis">global.asax</span>" ファイルが変更されて、アプリケーションが破損したときに発生します。このイベントのイベントハンドラーは、"<span class="emphasis">global.asax</span>" アプリケーションファイルで定義する必要があります。
</p>
							</td>
						</tr>
						<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
						</tr>
					</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">パラメータ</span></td>
				</tr>
				<tr>
					<td><p>なし</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">例</span></td>
				</tr>
				<tr>
					<td><p>次の例では、アプリケーションイベントログに、end イベントが発生したことを示すエントリを書き込みます。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td><span class="programlisting"><pre>&lt;Script language="VB" runat="server"&gt;
   Sub Application_OnEnd(  )
      Dim EventLog1 As New System.Diagnostics.EventLog ("Application", _
         ".", "mySource")
      EventLog1.WriteEntry("Application_OnEnd fired!")
   End Sub
&lt;/script&gt;</pre>
						</span></td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
				<tr>
					<td valign="top" colspan="2"><span class="title">メモ</span></td>
				</tr>
				<tr>
					<td><p>Web サービスが停止するか "<span class="emphasis">global.asax</span>" ファイルが変更されてアプリケーションが終了したときは、end イベントを使ってクリーンアップ作業を実行すると便利です。
</p>
					</td>
				</tr>
				<tr><td valign="top" colspan="2" class="clearseparation">&#160;</td>
				</tr>
			</table>
		</div>
	</body></html>