int ByteCount { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The ByteCount property of the Bitmap class in the Sandbox namespace provides the total number of bytes used by the bitmap. This property is useful for understanding the memory footprint of the bitmap data.

Usage

To access the ByteCount property, you need to have an instance of the Bitmap class. This property is read-only and returns an integer representing the total byte size of the bitmap.

Example

// Example of accessing the ByteCount property

// Assume 'bitmap' is an instance of Sandbox.Bitmap
int totalBytes = bitmap.ByteCount;

// Output the byte count
// Note: Avoid using Console.WriteLine in Sandbox
// Instead, use appropriate logging or debugging methods
// Debug.Log($"Bitmap uses {totalBytes} bytes.");