随笔分类 - C#
摘要:/// /// DataSet转换为实体类/// /// 实体类/// DataSet/// 待转换数据表索引/// 实体类public static T DataSetToEntity(DataSet p_DataSet, int p_TableIndex){ if (p_DataSet =...
阅读全文
摘要:遍历获得一个实体类的所有属性名,以及该类的所有属性的值//先定义一个类:public class User{ public string name { get; set; } public string gender { get; set; } public string age { get;...
阅读全文
摘要:/**//// /// 把DataSet、DataTable、DataView格式转换成XML字符串、XML文件 /// public class DataToXml { /**//// /// 将DataTable对象转换成XML字符串 ...
阅读全文
摘要:我们需要在XML与实体类,DataTable,List之间进行转换,下面是XmlUtil类. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Data; using System.Xml; using System...
阅读全文
摘要:ASM概述 Automatic Storage Management(ASM)是Oracle数据库10g中一个非常出色的新特性,它以平台无关的方式提供了文件系统、逻辑卷管理器以及软件RAID等服务。ASM可以条带化和镜像磁盘,从而实现了在数据库被加载的情况下添加或移除磁盘以及自动平衡 I/O 以删除“热点”。 ASM中的文件既可以由数据库自动创建和命名(通过使用 Oracle 管理文件...
阅读全文
摘要://截取全屏图象 private void btnFullScreen_Click(object sender, EventArgs e) { //创建图象,保存将来截取的图象 Bitmap image = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.Pri...
阅读全文
摘要:WMI方式 using System; using System.Management; using System.Text.RegularExpressions; using System.Collections.Generic; namespace Splash.IO.PORTS { /// /// 即插即用设备信息结构 /// public struc...
阅读全文
摘要:using System.Net.NetworkInformation; /// /// 获取第一个可用的端口号 /// /// public static int GetFirstAvailablePort() { int MAX_PORT = 6000; //系统tcp/udp端口数最大是65535 int BEGIN_PORT = 5000;//...
阅读全文
摘要:1. 在ASP.NET中专用属性:获取服务器电脑名:Page.Server.ManchineName获取用户信息:Page.User获取客户端电脑名:Page.Request.UserHostName获取客户端电脑IP:Page.Request.UserHostAddress2. 在网络编程中的通用...
阅读全文
摘要:代码如下: 1 using System; 2 using System.Collections.Generic; 3 using System.Text; 4 using System.IO; 5 6 namespace GetCRC32 7 { 8 class CRC32Cls 9 {10 protected ulong[] Crc32Table;11 //生成CRC32码表12 public void GetCRC32Table() 13 {14 ulong Crc;15 ...
阅读全文

浙公网安备 33010602011771号