上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页
摘要: I received a question about this recently, so i figured i'd elaborate here with a little example...Let's assume we have the followingthree dlls:anycpu... 阅读全文
posted @ 2011-06-21 00:41 liancs 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 以下代码在visiual studio 2003下调试通过。方法一:使用GetHostByAddress函数string mystartIP = "222.206.84."; // IP地址string myip;int s;string name;for(s = 1; s <= 125; s++)... 阅读全文
posted @ 2011-06-19 09:56 liancs 阅读(681) 评论(0) 推荐(0) 编辑
摘要: 使用C#调用外部Ping命令获取网络连接情况以前在玩Windows 98的时候,几台电脑连起来,需要测试网络连接是否正常,经常用的一个命令就是Ping.exe。感觉相当实用。现在 .net为我们提供了强大的功能来调用外部工具,并通过重定向输入、输出获取执行结果,下面就用一个例子来说明调用Ping.e... 阅读全文
posted @ 2011-06-19 09:08 liancs 阅读(669) 评论(0) 推荐(0) 编辑
摘要: 代码如下: SqlConnection conn = new SqlConnection("server=数据库服务器名;uid=sa;pwd=sa"); SqlCommand cmd = new SqlCommand("select name from sys.databases",conn); ... 阅读全文
posted @ 2011-06-18 17:47 liancs 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 1、添加对COM组件SQLDMO.dll的引用,对应组件名为Microsoft SQLDMO Object Library2、添加引用后将右击引用属性,将"嵌入互操作类型"设为false3、点击按钮,列表显示在combobox中,代码如下: /// /// 显示当前局域网内可用sqlserver数... 阅读全文
posted @ 2011-06-18 17:29 liancs 阅读(388) 评论(0) 推荐(0) 编辑
摘要: 1DateTimedt=DateTime.Now;2//Label1.Text=dt.ToString();//2005-11-513:21:253//Label2.Text=dt.ToFileTime().ToString();//1277564168599128164//Label3.Text=... 阅读全文
posted @ 2011-06-17 16:45 liancs 阅读(1015) 评论(0) 推荐(0) 编辑
摘要: 1、xaml如下: 注意:此处AutoGenerateColumns="False" 2、代码如下:private void Window_Loaded(object sender, RoutedEventArgs e) { ArrayList fileList = new ArrayL... 阅读全文
posted @ 2011-06-17 10:18 liancs 阅读(290) 评论(0) 推荐(0) 编辑
摘要: 1、添加DataGridHyperlinkColumn列后,xaml如下: 2、实现效果,点击一个链接打开链接对应的文件,方法:在DataGrid的首标签内添加 Hyperlink.Click="dataGrid1_Click"属性,即DataGrid中链接的单击事件3、代码如下:pri... 阅读全文
posted @ 2011-06-17 09:46 liancs 阅读(1126) 评论(0) 推荐(1) 编辑
摘要: using System;using System.Collections.Generic;using System.Text;using System.Net;using System.Net.Mail;using System.Net.Mime;namespace WindowsFormsApp... 阅读全文
posted @ 2011-06-15 10:49 liancs 阅读(132) 评论(0) 推荐(0) 编辑
摘要: SQL中判断字符串中包含字符的方法通过2个函数CHARINDEX和PATINDEX以及通配符的灵活使用函数:CHARINDEX和PATINDEXCHARINDEX:查某字符(串)是否包含在其他字符串中,返回字符串中指定表达式的起始位置。PATINDEX:查某字符(串)是否包含在其他字符串中,返回指定... 阅读全文
posted @ 2011-06-11 10:32 liancs 阅读(538) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页