如何在c#中保存结果 [英] how to save the result in c#
本文介绍了如何在c#中保存结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何存储结果并在代码中再次使用它们
让我得到这个明确的家伙;
我编写的代码是关于计算阶乘,我需要将它们存储在内存中,如:
如果我计算87! ,然后是88! ,程序必须使用之前的结果来接受它像87!x88
我不要求代码!我只需要知道我该怎么做,我的意思是如何将它们存储在课堂上?
解决方案
您可以将中间结果存储到<$ c $中c>列表< BigInteger> 。
您可以将第一个结果存储在注册表中并稍后检索它,或者创建一个Serializable类并使用它来存储第一个结果结果
how to storing a result and using them again in code ,
let me get this clear guys ;
the code i wrote is about calculating the factorial , i need to store them in memory like ;
if i calculate 87! , and then 88! ,program must use the previous result to take it over like 87!x88
i dont ask for code! i only need to know how can i do it , i mean how can i store them in class?
解决方案
You may store the intermediate results into a List<BigInteger>
.
You can store the first results in the registry and retrieve it later or create a Serializable class and use it to store the first result
这篇关于如何在c#中保存结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文