Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -473,12 +473,12 @@ public bool TryGetSByte(out sbyte value)
[CLSCompliant(false)]
public sbyte GetSByte()
{
if (TryGetSByte(out sbyte value))
if (!TryGetSByte(out sbyte value))
{
return value;
ThrowHelper.ThrowFormatException();
}

throw new FormatException();
return value;
}

/// <summary>
Expand Down Expand Up @@ -523,12 +523,12 @@ public bool TryGetByte(out byte value)
/// </exception>
public byte GetByte()
{
if (TryGetByte(out byte value))
if (!TryGetByte(out byte value))
{
return value;
ThrowHelper.ThrowFormatException();
}

throw new FormatException();
return value;
}

/// <summary>
Expand Down Expand Up @@ -570,12 +570,12 @@ public bool TryGetInt16(out short value)
/// </exception>
public short GetInt16()
{
if (TryGetInt16(out short value))
if (!TryGetInt16(out short value))
{
return value;
ThrowHelper.ThrowFormatException();
}

throw new FormatException();
return value;
}

/// <summary>
Expand Down Expand Up @@ -622,12 +622,12 @@ public bool TryGetUInt16(out ushort value)
[CLSCompliant(false)]
public ushort GetUInt16()
{
if (TryGetUInt16(out ushort value))
if (!TryGetUInt16(out ushort value))
{
return value;
ThrowHelper.ThrowFormatException();
}

throw new FormatException();
return value;
}

/// <summary>
Expand Down
Loading