
c#
文章平均质量分 66
无敌土豆
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Windows Mobile操作蓝牙打印机
<br />using System;<br />using System.Collections.Generic;<br />using System.Text;<br />using System.IO;<br />using System.IO.Ports;<br /><br />namespace BluetoothTest<br />{<br /> public class Printer<br /> {<br /> SerialPort server = new Ser转载 2011-05-09 16:26:00 · 1172 阅读 · 0 评论 -
c# 蓝牙打印
<br />using System;<br />using System.Collections.Generic;<br />using System.Text;<br />using System.IO;<br />using System.IO.Ports;<br /><br />namespace BluetoothTest<br />{<br /> public class Printer<br /> {<br /> SerialPort server = new Ser原创 2011-05-12 14:59:00 · 2025 阅读 · 1 评论 -
c# sqlserver blod字段的读取
<br />Byte[] blob = null; FileStream fs = null; const string sConn = "server=(local);Initial Catalog=Northwind;UID=ctester;PWD=password"; try { SqlConnection conn = new SqlConnection(sConn); SqlCommand cmd = new SqlCommand("SELECT Picture FROM Categories W转载 2011-05-16 14:39:00 · 1032 阅读 · 0 评论 -
C# 断点续传的例子 单线程 ,支持按钮暂停和开始
网上没有一个完整的例子。我把网上的资源整理了一下,可以实现如下功能1.支持http式下载,可以定义文件名,手工定义2.实现下载--暂停--继续 功能。演示断点续传3.实时查看当前下载的文件大小。4.注释写的不好,几乎没有。用 C# 2008 写的using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;u转载 2011-04-29 16:27:00 · 972 阅读 · 0 评论 -
C# 在dll(类库)中调用webservices出错
在DLL项目中引用一个WEB服务出现:在 ServiceModel 客户端配置部分中,找不到引用协定“ServiceReference1.Service1Soap”的默认终结点元素。这可能是因为未找到应用程序的配置文件,或者是因为客户端元素中找不到与此协定匹配的终结点元素。但是在EXE中项目中引用该WEB服务则没有问题。 需要在引用DLL的EXE项目中引用同样的WEB服务,最好W转载 2011-06-27 17:27:00 · 1275 阅读 · 0 评论 -
WebService身份验证解决方案
WebService身份验证解决方案 解决方案一:通过SOAP Header传递用户名和密码。1. 首先需要在服务中定义一个从 SOAPHeader 派生的类,表示传入 SOAP 标头的数据。 代码如下:public class SecurityHeader : System.Web.Services.Protocols.SoapHeader{ private static st转载 2011-06-29 10:13:00 · 1144 阅读 · 0 评论 -
在C#中调用API获取网络信息和流量
在C#中调用API获取网络信息和流量<br />最近一项目中要求显示网络流量,而且必须使用C#。<br /><br />事实上,调用 IpHlpApi.dll 的 GetIfTable API 可以轻易获得网络信息和网络流量。只是要在C#中实现还是比较复杂。<br /><br />先看看怎么定义该 API [DllImport("IpHlpApi.dll")]<br /> extern static public uint GetIfTable(byte[] pIfTable, ref uin转载 2011-05-09 16:02:00 · 623 阅读 · 0 评论 -
通过DataSet 操作xml
using System;using System.Collections;using System.ComponentModel;using System.Data;using System.Drawing;using System.Web;using System.Web.SessionState;using System.Web.UI;using System转载 2011-11-04 08:26:40 · 345 阅读 · 0 评论