HttpRequest.TotalBytes 속성

정의

현재 입력 스트림의 바이트 수를 가져옵니다.

public:
 property int TotalBytes { int get(); };
public int TotalBytes { get; }
member this.TotalBytes : int
Public ReadOnly Property TotalBytes As Integer

속성 값

Int32

입력 스트림의 바이트 수입니다.

예제

다음 코드 예제에서는 속성 값이 1000바이트보다 큰지 여부를 TotalBytes 확인하고 해당 정보를 파일에 씁니다.

// 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");
}
' 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

적용 대상