Method PostDecExcept
- Namespace
- Zyl.VectorTraits.Impl.Util
- Assembly
- VectorTraits.dll
PostDecExcept<T>(ref T, out T, T, T)
When not equal to the specified value, post-decrement of the given managed pointer. It contains the checkValue parameter (当不与指定值相等时, 向给定的托管指针后置递减. 它含有 checkValue 参数).
Mnemonic: beforeValue = (*p != checkValue) ? *p-- : newValue).
public static ref T PostDecExcept<T>(ref T source, out T beforeValue, T checkValue, T newValue) where T : IEquatable<T>
Parameters
sourceTThe managed pointer to decrement to (要向其递减的托管指针).
beforeValueTWhen not equal to the specified value, returns the value pointed to before the decrement. Otherwise, it returns
newValue(当不与指定值相等时, 返回递减前所指向的值. 否则便返回newValue).checkValueTSpecial values to be check (将进行检查的特殊值).
newValueTWhen equal to the specified value,
beforeValuereturns the new value (当与指定值相等时,beforeValue会返回这个新值).
Returns
- T
When not equal to the specified value, post-decrement of the given managed pointer. Otherwise, it returns
source(当不与指定值相等时, 向给定的托管指针后置递减. 否则便返回source).
Type Parameters
TThe elemental type of the managed pointer (托管指针的元素类型).
- See Also
PostDecExcept<T>(ref T, out T, T)
When not equal to the specified value, post-decrement of the given managed pointer (当不与指定值相等时, 向给定的托管指针后置递减).
Mnemonic: beforeValue = (*p != checkValue) ? *p-- : newValue).
public static ref T PostDecExcept<T>(ref T source, out T beforeValue, T checkValue) where T : IEquatable<T>
Parameters
sourceTThe managed pointer to decrement to (要向其递减的托管指针).
beforeValueTReturns the value pointed to before the decrement (返回递减前所指向的值).
checkValueTSpecial values to be check (将进行检查的特殊值).
Returns
- T
When not equal to the specified value, post-decrement of the given managed pointer. Otherwise, it returns
source(当不与指定值相等时, 向给定的托管指针后置递减. 否则便返回source).
Type Parameters
TThe elemental type of the managed pointer (托管指针的元素类型).
- See Also