INumberBase<TSelf>.TryConvertFromChecked<TOther> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Tries to convert a value to an instance of the the current type, throwing an overflow exception for any values that fall outside the representable range of the current type.
protected:
generic <typename TOther>
where TOther : System::Numerics::INumberBase<TOther> static bool TryConvertFromChecked(TOther value, [Runtime::InteropServices::Out] TSelf % result);
protected static abstract bool TryConvertFromChecked<TOther> (TOther value, out TSelf result) where TOther : System.Numerics.INumberBase<TOther>;
static member TryConvertFromChecked : 'Other * 'Self -> bool (requires 'Other :> System.Numerics.INumberBase<'Other>)
Protected Shared Function TryConvertFromChecked(Of TOther As INumberBase(Of TOther)) (value As TOther, ByRef result As TSelf) As Boolean
Type Parameters
- TOther
The type of value
.
Parameters
- value
- TOther
The value that's used to create the instance of TSelf
.
- result
- TSelf
When this method returns, contains an instance of TSelf
converted from value
.
Returns
false
if TOther
is not supported; otherwise, true
.
Exceptions
value
is not representable by TSelf
.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기