如何通过只写数字来初始化任意大小的整数? [英] How to initialize arbitrary-sized integer by just writing the number?
本文介绍了如何通过只写数字来初始化任意大小的整数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,我正在写一个任意大小的数字类.
我知道已经编写了类,但是我喜欢自己做.
课程结束后,我想写
Hi everyone, i''m writing an arbitrary-sized numeric class.
I know that already written classes exist but i just like doing my own.
When the class will be finished i''d like to write
BigInt n=999999999999999999;
或
or
BigInt n=new BigInt(999999999999999999);
代替
instead of
BigInt n=new BigInt("999999999999999999");
怎么办?
预先感谢您的帮助.
How to do?
Thanks in advance for your help.
推荐答案
这是不可能的,除非您编写自己的C#编译器
唯一的选择是字符串.
It''s not possible, unless you write your own C# compiler
Your only option is the string.
这篇关于如何通过只写数字来初始化任意大小的整数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文