变量模式 ar c = int.TryP

Console.WriteLine("---------------------------------------------");
            for (int i = 0; i < 3; i++)
            {
                var watch = Stopwatch.StartNew();

                for (int k = 0; k < 50000; k++)
                {
                   var num = int.TryParse(&quot;xxx&quot;, out int reuslt);
                }

                watch.Stop();

                Console.WriteLine($&quot;i={i + 1},耗费:{watch.laipuhuo.com ElapsedMilliseconds}&quot;);
全部评论

相关推荐

码农索隆:这种hr,建议全中国推广
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务