随笔分类 - C#<进阶>
C#<进阶>
摘要:private static void GetTableSchema( string connstring,string commandText ) { string TatableName = "test_table_" + DateTime.Now.ToString("mmss"); string outfilepath=@"C:\OUTFILE.TXT"; using (SAConnection connection = new SAConnection(connstring)) { connection.Open(); SAC
阅读全文
摘要://DeleteScc(); //清除VSS的引用 private static void DeleteScc() { string path = @"E:\FormD"; DirectoryInfo Infos = new DirectoryInfo(path); DeleteDirectoryInfo(Infos); } private static void DeleteDirectoryInfo(DirectoryInfo dInfo) { FileInfo[] fs = dInfo.GetFiles(); foreach (FileInfo finfo in fs
阅读全文
摘要:http://topic.csdn.net/u/20110517/18/6084ddbc-74ba-409e-8423-eeb61b40429a.htmlhttp://blogs.msdn.com/b/aconrad/archive/2007/09/07/science-project.aspxclassSample{staticvoidMain(string[]args){//createsequenceItem[]items=newItem[]{newBook{Id=1,Price=13.50,Genre="Comedy",Author="JimBob&quo
阅读全文
摘要:1 数据库 汉字字母的转换函数2 改变数据源 然后重新绑定下[代码]代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--GOcreatefunction[dbo].f_GetPy(@strnvarchar(4000))returnsnvarchar(...
阅读全文
摘要:Discuz开源代码结构分析 http://www.cnblogs.com/wsky/archive/2008/04/11/1149098.html 【渐进】延迟加载机制的简易实现(上) http://www.cnblogs.com/wsky/archive/2009/10/23/1588890.html基于特性和反射机制的通用持久化类的引入http://blog.csdn.net/gisfarm...
阅读全文
摘要:用C#制作PDF文件全攻略(转) StreamWriter pPDF=new StreamWriter(filePath); ArrayList xRefs=new ArrayList(); float yPos =0f; long streamStart=0; long streamEnd=0; long streamLen =0; string strPDFMessage=null; //PD...
阅读全文
摘要:[代码]// reverse 倒序输出 string str = Console.ReadLine(); for (int i = str.Length - 1; i >= 0; i--) { Console.Write(str[i]); } Console.ReadLine();对字符串处理的常见功能*计算字符串的长度*stringmyString="Thisisatest!";Conso...
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace abstractFactory{ class abstractFactory //第153行 和 15行 扩展就可以了 { static void Main(string[] args) { GameManager ...
阅读全文
摘要:在很多时候需要按照一定的格式生成一定数量的随机数,下面是实现方法 下面是自己写的类 public class MyRandom { private string _strin; private string _strout; private Random _rnd; public MyRandom(string strin) { _rnd=new Random(System.Environment...
阅读全文
摘要:2009-05-19 17:49序列化和反序列化我们可能经常会听到,其实通俗一点的解释,序列化就是把一个对象保存到一个文件或数据库字段中去,反序列化就是在适当的时候把这个文件再转化成原来的对象使用。 我想最主要的作用有: 1、在进程下次启动时读取上次保存的对象的信息 2、在不同的AppDomain或进程之间传递数据 3、在分布式应用系统中传递数据 ...... 在C#中常见的序列化的方法主要也有三...
阅读全文
摘要://-------------//| ---XML----|//-------------//XmlElement theBook = null, theElem = null, root = null;//XmlDocument xmldoc = new XmlDocument();//try//{ // xmldoc.Load("Books.xml");// root = xmldoc.Doc...
阅读全文
摘要:#region Copyright 2009/** Created:2009.06.12* Description:* Last Modified: 2009.06.12*RemarK序列化待实现 引入trinet.dll Bug休眠* Version: 2.0*/#endregionusing System;using System.Collections.Generic;using Syste...
阅读全文
浙公网安备 33010602011771号