本文整理汇总了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())
{
}
示例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);
}