asNumber

fun asNumber(): BsonNumber

Gets this value as a BsonNumber if it is one, otherwise throws exception

Return

a BsonNumber

Throws

if this value is not of the expected type