/// <summary>
/// Decodes the value of the current TLV a 64bit integer.
/// Throws an exception in case of a format mismatch.
/// </summary>
/// <returns>The integer value of the current TLV.</returns>
public long GetLong()
{
if (IsContainer || Length == 0 || Value == null)
{
ThrowError(203, "Invalid Integer encoding");
}
Debug.Assert(Value != null || Length == 0);
Debug.Assert(Type == BerType.Integer || BerType.IsApplicationDefined(Type));
var input = new BerMemoryInput(Value);
return(BerEncoding.DecodeLong(input, Length));
}