asp.net 组合模式的一个例子
实现代码如下: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Test { class Program { static void Main(string
实现代码如下: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Test { class Program { static void Main(string
效果: .aspx: 实现代码如下: .aspx.cs: 实现代码如下: using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.W
W3C制定了XML DOM标准,.Net为了支持W3C的标准,从1.1版本开始就引入了XmlDocument类。我在前一篇博客中,介绍了如何使用XmlDocument类来对XML文档进行操作。后来 .Net又引入了LINQ,于是LINQ to XML也就应运而生,所以在.Net中,不仅可以用W3C
我在以前的博客中介绍了如何使用XmlDocument类对XML进行操作,以及如何使用LINQ to XML对XML进行操作。它们分别使用了XmlDocument类和XDocument类。在本文中,我再介绍一个类,XmlTextWriter。我们分别用这三个类将同样的xml内容写入文档,看一看哪种写法
truncate table 表名 ( 数据不可恢复性的删除 truncate 标识列会重排 ) LinqUtil.Db.ExecuteCommand("TRUNCATE TABLE warehousing"); //warehousing为表名,此种删除效率更高,且会清空计数器,但是有外键的表则不
思路很简单,从所有Blog Model中解析出所有文章使用的图片文件名,排除站外引用,放入一个List usedPicList。再遍历图片上传文件夹,把所有图片文件的结果加入FileInfo[] fiAllPicList。然后比较usedPicList和fiAllPicList,找出所有fiAllP
下面以数组为例,展示一些常用LINQ操作。 实现代码如下: static void Main(string[] args) { int[] a = { 1, 2, 3, 4, 5, 6, 7 }; int[] b = { 4, 5, 6, 7, 8, 9, 10 }; int[] c = { 1,
实现代码如下: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Drawing; using System.Drawing.Drawing2D; usi
1. ADO.NET 方式连接Mysql数据库 经过在网上查找资料,在.net 上连接mysql 数据库有三种方式: 方法一: 使用CoreLab推出的MYSQL访问组件,引用命名空间CoreLab.MySql 方法二: 通过ODBC访问MYSQL数据库, 前要先下载两个组件:odbc.net和MY
Entity: 实现代码如下: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.Serialization; namespace En