C#格式化数字

2021-09-23 16:15

阅读:1090

标签:form   text   str1   mono   oca   res   tor   blog   mem    var t1 = Profiler.GetMonoHeapSize()/div; var t2 = Profiler.GetMonoUsedSize() / div; var t3 = Profiler.GetTotalAllocatedMemory() / div; var t4 = Profiler.GetTempAllocatorSize() / div; var t5 = Profiler.GetTotalReservedMemory() / div; var t6 = Profiler.GetTotalUnusedReservedMemory() / div; var t7 = Profiler.usedHeapSize / div; var t8 = Profiler.enabled; // var str = string.Format("f", 120.3457f); // var str1 = string.Format("g", 120.3457f); // var str2 = string.Format("{0:f}", 120.3457f); // var str3 = string.Format("{0:0.000}", 120.3457f); // var str4 = string.Format("{0:0000}", 120.3457f); // var str5 = string.Format("{0:0000}", 120); //var str7 = string.Format("{0:d4}", 120); text.text = "程序内存:" + t7.ToString("f") + ", monoHeap:" +t1.ToString("f") + ",monoUsed:" + t2.ToString("f")+ ",all:" + t3.ToString("g");  C#格式化数字标签:form   text   str1   mono   oca   res   tor   blog   mem   原文地址:http://www.cnblogs.com/timeObjserver/p/7090136.html


评论


亲,登录后才可以留言!