Microsoft.CSharp.RuntimeBinder.Semantics.ConstValFactory.Copy C# (CSharp) Method

Copy() public method

public Copy ( ConstValKind kind, CONSTVAL value ) : CONSTVAL
kind ConstValKind
value CONSTVAL
return CONSTVAL
        public CONSTVAL Copy(ConstValKind kind, CONSTVAL value)
        {
            return new CONSTVAL(value.objectVal);
        }

Usage Example

        public void SetDefaultParameterValue(int index, CType type, CONSTVAL cv)
        {
            Debug.Assert(_defaultParameterIndex != null);
            ConstValFactory factory = new ConstValFactory();

            _defaultParameterIndex[index]         = true;
            _defaultParameters[index]             = factory.Copy(type.constValKind(), cv);
            _defaultParameterConstValTypes[index] = type;
        }
All Usage Examples Of Microsoft.CSharp.RuntimeBinder.Semantics.ConstValFactory::Copy