摘要: 1.dllimport 中函数名一致否2.安装Microsoft Visual Studio 11.0\VC\redist\2052下的vcredist_x86.exe 阅读全文
posted @ 2014-04-02 13:58 黄山红塔 阅读(408) 评论(0) 推荐(0) 编辑
摘要: 1 try 2 { 3 Process pp = Process.Start(processStartInfo); 4 string output = pp.StandardOutput.ReadToEnd(); 5 pp.WaitForExit(); 6 pp.Close(); 7 MessageBox.Show(output); 8 } 9 catch (E... 阅读全文
posted @ 2013-09-05 10:53 黄山红塔 阅读(934) 评论(0) 推荐(0) 编辑
摘要: 几个经常用到的字符串的截取string str="123abc456"; int i=3; 1 取字符串的前i个字符 str=str.Substring(0,i); // or str=str.Remove(i,str.Length-i); 2 去掉字符串的前i个字符: str=str.Remove(0,i); // or str=str.Substring(i); 3 从右边开始取i个字符: str=str.Substring(str.Length-i); // or str=str.Remove(0,str.Length-i); 4 从右边开始去掉i个字符: str=s 阅读全文
posted @ 2013-04-17 14:18 黄山红塔 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Compare 比较字符串的内容,考虑文化背景(场所),确定某些字符是否相等CompareOrdinal 与Compare一样,但不考虑文化背景Format 格式化包含各种值的字符串和如何格式化每个值的说明符IndexOf 定位字符串中第一次出现某个给定子字符串或字符的位置IndexOfAny 定位字符串中第一次出现某个字符或一组字符的位置LastIndexOf 与IndexOf一样,但定位最后一次出现的位置LastIndexOfAny 与IndexOfAny,但定位最后一次出现的位置PadLeft 在字符串的开头,通过添加指定的重复字符填充字符串PadRight 在字符串的结尾,通过添加指定 阅读全文
posted @ 2013-04-16 22:46 黄山红塔 阅读(183) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices;namespace ca001 { class Program { static void Main(string[] args) { Ini ini=new Ini(@"C:\Users\lenovo\Desktop\Demo11.ini"); //写入INI ini.Writue("Setting",&quo 阅读全文
posted @ 2013-04-16 14:37 黄山红塔 阅读(138) 评论(0) 推荐(0) 编辑