IronRuby.Builtins.RubyStruct.SetValues C# (CSharp) Method

SetValues() public method

public SetValues ( object items ) : void
items object
return void
        public void SetValues(object[]/*!*/ items) {
            ContractUtils.RequiresNotNull(items, "items");

            if (items.Length > _data.Length) {
                throw RubyExceptions.CreateArgumentError("struct size differs");
            }

            Array.Copy(items, _data, items.Length);
        }

Usage Example

Example #1
0
        public static RubyStruct /*!*/ InitializeCopy(RubyStruct /*!*/ self, [NotNull] RubyStruct /*!*/ source)
        {
            if (self.Class != source.Class)
            {
                throw RubyExceptions.CreateTypeError("wrong argument class");
            }

            self.SetValues(source.Values);
            return(self);
        }
All Usage Examples Of IronRuby.Builtins.RubyStruct::SetValues