INumberBase<TSelf>.TryConvertFromSaturating<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, saturating any values that fall outside the representable range of the current type.
protected:
generic <typename TOther>
where TOther : System::Numerics::INumberBase<TOther> static bool TryConvertFromSaturating(TOther value, [Runtime::InteropServices::Out] TSelf % result);
protected static abstract bool TryConvertFromSaturating<TOther> (TOther value, out TSelf result) where TOther : System.Numerics.INumberBase<TOther>;
static member TryConvertFromSaturating : 'Other * 'Self -> bool (requires 'Other :> System.Numerics.INumberBase<'Other>)
Protected Shared Function TryConvertFromSaturating(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 which is 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
.
Applies to
Співпраця з нами на GitHub
Джерело цього вмісту можна знайти на GitHub, де також можна створювати й переглядати запитання та запити на внесення змін. Докладні відомості наведено в нашому посібнику для співавторів.