Mono.Cxxi.CppType.Subtract C# (CSharp) Method

Subtract() public method

public Subtract ( CppModifiers modifier ) : CppType
modifier CppModifiers
return CppType
		public CppType Subtract (CppModifiers modifier)
		{
			CppType newType = this;
			newType.internalModifiers = new List<CppModifiers> (((IEnumerable<CppModifiers>)newType.Modifiers).Reverse ().WithoutFirst (modifier));
			return newType;
		}

Same methods

CppType::Subtract ( CppType type ) : CppType

Usage Example

Example #1
0
        // Removes the modifiers on the passed instance from this instance
        public CppType Subtract(CppType type)
        {
            if (internalModifiers == null)
            {
                return(this);
            }

            CppType current = this;

            foreach (var modifier in ((IEnumerable <CppModifiers>)type.Modifiers).Reverse())
            {
                current = current.Subtract(modifier);
            }

            return(current);
        }