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