
C#
风儿你慢慢吹
热爱让我们一往无前,走过的路总需要留下点什么
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C# 调试程序时需要将变量结果输出的实现方法(检验每次循环变量的结果是否一致)
背景介绍:需要输出一个循环里的两个变量;解决思路:没成功的方法:直接用writealllines会覆盖原有文件(好像),听说有File.AppendAllLines(没用过,提供个思路)成功的方法:用了streamwriter和stringbuilder.代码如下:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Ta.原创 2020-05-22 09:08:44 · 657 阅读 · 0 评论 -
C# 报错: error Use of unassigned local variable"a" 解决办法
Build C# solution时,报了Use of unassigned local variable"a" 这个error。Error 原因:局部变量在C#函数最开始声明的时候没有初始化赋值。例如 :原来 double a;改进: double a=0:就不会再报错了!...原创 2020-03-24 13:29:37 · 7765 阅读 · 0 评论