HttpRequest.TotalBytes プロパティ
現在の入力ストリームのバイト数を取得します。
名前空間: System.Web
アセンブリ: System.Web (system.web.dll 内)
構文
'宣言
Public ReadOnly Property TotalBytes As Integer
'使用
Dim instance As HttpRequest
Dim value As Integer
value = instance.TotalBytes
public int TotalBytes { get; }
public:
property int TotalBytes {
int get ();
}
/** @property */
public int get_TotalBytes ()
public function get TotalBytes () : int
適用できません。
プロパティ値
入力ストリームのバイト数。
使用例
TotalBytes プロパティ値が 1000 バイトより大きいかどうかを確認し、その情報をファイルに書き込むコード例を次に示します。
' Write a message to the file dependent upon
' the value of the TotalBytes property.
If Request.TotalBytes > 1000 Then
sw.WriteLine("The request is 1KB or greater")
Else
sw.WriteLine("The request is less than 1KB")
End If
// Write a message to the file dependent upon
// the value of the TotalBytes property.
if (Request.TotalBytes > 1000)
{
sw.WriteLine("The request is 1KB or greater");
}
else
{
sw.WriteLine("The request is less than 1KB");
}
プラットフォーム
Windows 98,Windows Server 2000 SP4,Windows CE,Windows Millennium Edition,Windows Mobile for Pocket PC,Windows Mobile for Smartphone,Windows Server 2003,Windows XP Media Center Edition,Windows XP Professional x64 Edition,Windows XP SP2,Windows XP Starter Edition
Microsoft .NET Framework 3.0 は Windows Vista,Microsoft Windows XP SP2,および Windows Server 2003 SP1 でサポートされています。
バージョン情報
.NET Framework
サポート対象 : 3.0,2.0,1.1,1.0