统计C#项目有效代码行数的实现过程
1.实现单文件的有效行数统计
private Int64 CountTheLines(string path)
{
Int64 nowCount = 0;
try
{
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
StreamReader sr = new StreamReader(fs);
string str = sr.ReadLine();
while (str != null)
{
str = str.Trim();
try
{