BLUE.NET

-------- 众里寻她千百度

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 17 下一页

2009年3月13日

摘要: 要操作注册表首先要引用命名空间 using Microsoft.Win32; C#中操作注册表提供了两个类,它们是Registry类和RegistryKey类。Registry类主是是提供静态方法对项的访问,RegistryKey类提供实例方法对具体项和值进行读写,经典的做法是通过Registry类的静态方法返回一个项对象,然后用RegistryKey类的方法读写这个项对象里面的数据。 Reg... 阅读全文
posted @ 2009-03-13 13:26 blue.net 阅读(1329) 评论(1) 推荐(0)

摘要: Opacity 将整个窗体透明 This.Opacity=0.5; //整个窗体的透明度从0.0到0.9的小数(如:0.5是半透明状态) TransparencyKey 将某种颜色变为透明 BackColor = Color.Gray; //将背景颜色设为Gray TransparencyKey = Col... 阅读全文
posted @ 2009-03-13 13:25 blue.net 阅读(773) 评论(0) 推荐(0)

摘要: 要使用泛型集合,首先导入命名空间using System.Collections.Generic; using System; namespace program { //定义泛型接口类 public interface wangjun { //定义泛型接口方法 void show(T t); } //定义泛型类继承自泛型接口... 阅读全文
posted @ 2009-03-13 13:23 blue.net 阅读(314) 评论(0) 推荐(0)

摘要: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; //使用线程时要引用命名空间... 阅读全文
posted @ 2009-03-13 13:22 blue.net 阅读(320) 评论(0) 推荐(0)

摘要: using System; namespace program { //定义泛型类 class wangjun { //定义泛型委托 public delegate void mydelegate(T t); //定义泛型方法 public void show(T t) { ... 阅读全文
posted @ 2009-03-13 13:21 blue.net 阅读(180) 评论(0) 推荐(0)

摘要: Lock(object)锁的使用 using System; using System.Threading; namespace program { class wangjun { public static string buff = "0"; public const int ab = 1000000; private objec... 阅读全文
posted @ 2009-03-13 13:17 blue.net 阅读(1252) 评论(1) 推荐(0)

摘要: 创建账户 exec Sp_addlogin 'xyz','123456','master' 查看账户信息 Sp_helplogins @loginnamepattern='xyz' 为xyz 建立数据库账户 sp_grantdbaccess 'xyz' , 'zlf' 查看所有账户信息 sp_helpuser 删除数据库账户'zlf' sp_revokedbaccess 'zlf' 删除登陆账户'... 阅读全文
posted @ 2009-03-13 13:10 blue.net 阅读(175) 评论(0) 推荐(0)

摘要: select语句中只能使用sql函数对字段进行操作(链接sql server), select 字段1 from 表1 where 字段1.IndexOf("云")=1; 这条语句不对的原因是indexof()函数不是sql函数,改成sql对应的函数就可以了。 left()是sql函数。 select 字段1 from 表1 where charindex('云',字段1)=1; 字符串函数对二进... 阅读全文
posted @ 2009-03-13 13:07 blue.net 阅读(175) 评论(0) 推荐(0)

摘要: 查看数据库内表的信息 select * from sysobjects where type='u' 查看数据库内表的名字 select name from sysobjects where type='u' 阅读全文
posted @ 2009-03-13 13:06 blue.net 阅读(122) 评论(0) 推荐(0)

摘要: 时间转换bb=2007-12-12 10:24:55 Convert.ToDateTime(bb).ToString("yyyy-MM-dd")只要年月日 全要的话:Convert.ToDateTime(bb).ToString("yyyy-MM-dd HH:mm:ss") 创建表 Create Table 表名 ( 表内字段... 阅读全文
posted @ 2009-03-13 13:04 blue.net 阅读(201) 评论(0) 推荐(0)

上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 17 下一页