zoukankan      html  css  js  c++  java
  • C#函数库

    //读取文本文件并返回内容不同的那一行
            public static String different(String sOldFile, String sNewFile)
            {
                StreamReader srOld = new StreamReader(sOldFile);
                StreamReader srNew = new StreamReader(sNewFile);
                String sOldLine;
                String sNewLine;
                while(true)
                {
                    sOldLine = srOld.ReadLine();
                    sNewLine = srNew.ReadLine();
                    if( (sOldLine==null) || (sNewLine==null))
                    {
                        return null;
                    }
                    if( sOldLine == sNewLine)
                    {
                        continue;
                        
                    }
                    else
                    {
                        return sNewLine;
                    }
                    
                }
            }

  • 相关阅读:
    linux系统中批量对一类文件重命名
    hdu4751 Divide Groups
    tyvj1614 魔塔魔塔!
    noip2012 疫情控制
    黄学长模拟day1 大逃亡
    黄学长模拟day1 球的序列
    黄学长模拟day1 某种密码
    约瑟夫问题及其变形
    秦皇岛 I 题
    暴力搜索 + 剪枝
  • 原文地址:https://www.cnblogs.com/bingxing/p/8598774.html
Copyright © 2011-2022 走看看