HttpRequest.TotalBytes Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan jumlah byte dalam aliran input saat ini.
public:
property int TotalBytes { int get(); };
public int TotalBytes { get; }
member this.TotalBytes : int
Public ReadOnly Property TotalBytes As Integer
Nilai Properti
Jumlah byte dalam aliran input.
Contoh
Contoh kode berikut menentukan apakah TotalBytes nilai properti lebih besar dari 1000 byte dan menulis informasi tersebut ke file.
// 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