Returns the number of bits representing the specified data size.

Namespace: SharpAssembler.Core
Assembly: SharpAssembler Core (in SharpAssembler Core.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public static int GetBitCount(
	this DataSize datasize
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function GetBitCount ( _
	datasize As DataSize _
) As Integer
Visual C++
[ExtensionAttribute]
public:
static int GetBitCount(
	DataSize datasize
)

Parameters

datasize
Type: SharpAssembler.Core..::..DataSize
The DataSize to get the number of bits for.

Return Value

The number of bits for the data size.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DataSize. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .

Exceptions

ExceptionCondition
System.ComponentModel..::..InvalidEnumArgumentException!(Enum.IsDefined(typeof(DataSize), datasize))

Contracts

Requires
Enum.IsDefined(typeof(DataSize), datasize)
Ensures
Contract.Result<int>() >= 0

See Also