System.Runtime.Serialization.CodeGenerator.Not C# (CSharp) Метод

Not() приватный Метод

private Not ( ) : void
Результат void
        internal void Not()
        {
            if (_codeGenTrace != CodeGenTrace.None)
                EmitSourceInstruction("Not");
            _ilGen.Emit(OpCodes.Not);
        }

Usage Example

        public void Store(int bitIndex, bool value)
        {
            LocalBuilder local    = _locals[GetByteIndex(bitIndex)];
            byte         bitValue = GetBitValue(bitIndex);

            if (value)
            {
                _ilg.Load(local);
                _ilg.Load(bitValue);
                _ilg.Or();
                _ilg.Stloc(local);
            }
            else
            {
                _ilg.Load(local);
                _ilg.Load(bitValue);
                _ilg.Not();
                _ilg.And();
                _ilg.Stloc(local);
            }
        }