当前位置: 首页>>代码示例>>C#>>正文


C# BigInteger.ToList方法代码示例

本文整理汇总了C#中System.Numerics.BigInteger.ToList方法的典型用法代码示例。如果您正苦于以下问题:C# BigInteger.ToList方法的具体用法?C# BigInteger.ToList怎么用?C# BigInteger.ToList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Numerics.BigInteger的用法示例。


在下文中一共展示了BigInteger.ToList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RegisterOperation

 public RegisterOperation(RegisterOperationId id, BigInteger[] args)
     : base((byte)id, 
                                                             (args.ToList().ConvertAll<object>
                                                                                 (
                                                                                       x => (object)x
                                                                                 )
                                                              ).ToArray())
 {
 }
开发者ID:Hrombel,项目名称:AbstractDevelop,代码行数:9,代码来源:RegisterOperation.cs

示例2: ShouldEncodeMultipleTypesIncludingDynamicStringAndIntArray

        public virtual void ShouldEncodeMultipleTypesIncludingDynamicStringAndIntArray()
        {
            var paramsEncoded =
                "00000000000000000000000000000000000000000000000000000000000002c0000000000000000000000000000000000000000000000000000000000003944700000000000000000000000000000000000000000000000000000000000394480000000000000000000000000000000000000000000000000000000000039449000000000000000000000000000000000000000000000000000000000003944a000000000000000000000000000000000000000000000000000000000003944b000000000000000000000000000000000000000000000000000000000003944c000000000000000000000000000000000000000000000000000000000003944d000000000000000000000000000000000000000000000000000000000003944e000000000000000000000000000000000000000000000000000000000003944f0000000000000000000000000000000000000000000000000000000000039450000000000000000000000000000000000000000000000000000000000003945100000000000000000000000000000000000000000000000000000000000394520000000000000000000000000000000000000000000000000000000000039453000000000000000000000000000000000000000000000000000000000003945400000000000000000000000000000000000000000000000000000000000394550000000000000000000000000000000000000000000000000000000000039456000000000000000000000000000000000000000000000000000000000003945700000000000000000000000000000000000000000000000000000000000394580000000000000000000000000000000000000000000000000000000000039459000000000000000000000000000000000000000000000000000000000003945a0000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000568656c6c6f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005776f726c64000000000000000000000000000000000000000000000000000000";

            var function = new FunctionMultipleInputOutput();
            function.A = "hello";
            function.C = "world";

            var array = new BigInteger[20];
            for (uint i = 0; i < 20; i++)
            {
                array[i] = i + 234567;
            }

            function.B = array.ToList();

            var result = new FunctionCallEncoder().EncodeRequest(function, "c6888fa1");

            Assert.Equal("0x" + "c6888fa1" + paramsEncoded, result);
        }
开发者ID:Nethereum,项目名称:Nethereum,代码行数:21,代码来源:FunctionAttributeEncodingTests.cs


注:本文中的System.Numerics.BigInteger.ToList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。