04 2014 档案
摘要:StreamWriter SW; SW = File.CreateText(@"C:\Documents and Settings\Administrator\桌面\MyTextFile.txt"); SW.WriteLine("File Created ...
阅读全文
摘要:保存image到databasepublic bool SaveImage(string filePath) { bool isSuccess = false; string FilePath = filePath; s...
阅读全文
摘要:FilePath.Substring(FilePath.LastIndexOf("\\") + 1)
阅读全文
摘要:1.this.dsConfig = new DataSet();//使用指定的文件将 XML 架构和数据读入 System.Data.DataSet。 this.dsConfig.ReadXml(System.Windows.Forms.Application.StartupP...
阅读全文
摘要:1.生成声音文件 DotNetSpeech.SpeechVoiceSpeakFlags SSF = DotNetSpeech.SpeechVoiceSpeakFlags.SVSFlagsAsync; DotNetSpeech.SpVoice vo = new SpVoiceClass(); Syst
阅读全文
摘要:private void ToConvert_Click(object sender, EventArgs e) { string strPath = System.Windows.Forms.Application.StartupPath; ...
阅读全文
摘要:List lst = new List(); lst.Add(new Person("A", "1")); lst.Add(new Person("C", "2")); lst.Add(new Person("B", "3")); ...
阅读全文
摘要:/// /// 把像素换算成毫米 /// /// 多少像素 /// 多少毫米 public static float PixelConvertMillimeter(float Pixel) { ...
阅读全文
摘要:1随机取出10条数据select top 10 * from MA_LOTorder bynewid()2.随机选择记录select newid()3.列出数据库里所有的表名select name from sysobjects where type='U' // U代表用户4.列出表里的所有的列名...
阅读全文
摘要:1.存在SP_MA_LOT_SELECTBYVNUMBER未加密的存储过程加密脚本CREATE PROC SP_MA_LOT_SELECTBYVNUMBER_E with ENCRYPTIONASEXECUTE SP_MA_LOT_SELECTBYVNUMBERgoSP_MA_LOT_SELECTB...
阅读全文
摘要:1.打开跨服务器功能exec sp_configure 'show advanced options',1 reconfigure exec sp_configure 'Ad Hoc Distributed Queries',1 RECONFIGURE2.关闭跨服务器功能 exec sp_c...
阅读全文
摘要:元组(Tuple)笛卡尔积中每一个元素(d1,d2,…,dn)叫作一个n元组(n-tuple)或简称元组。元组是关系数据库中的基本概念,关系是一张表,表中的每行(即数据库中的每条记录)就是一个元组,每列就是一个属性。 在二维表里,元组也称为记录。1.第一个例子 private Tuple Divide(int dividend, int divisor) { int result = dividend / divisor; int reminder = dividend % divisor; return Tuple.Create(result, reminder); //返回两个相同类型元素
阅读全文
摘要:class person :IComparable { public person(string name, string sex) { this.name = name; this.sex = sex; } public string name{set;get;} public string sex {set;get; } public int CompareTo(person other) { if (other == ...
阅读全文
摘要:你发现什么规律了吗?for (int i = 0; i < 5; i++) { a.SetValue((i+2).ToString(), i); } foreach (var item in a) { Console.WriteLine(item); } Console.WriteLine("&&&&&&&&&&&&&&&&&&&&&"); //string[]...
阅读全文
摘要:#line 是一个预编译命令,不是用来更改行号的,它仅在调试器中调试程序中起作用,如程序如果报错,将按着你给定的行号进行给出行号,而不是其默认的行号,还可以使用下面的形式#line 30 改变编译器中的行号#line hidden 隐藏行号,编译器在编译器时将忽略后面的代码,直到遇到另外一个#line#line default 恢复编译器的编码
阅读全文