c#编程
文章平均质量分 68
zfx277266940
这个作者很懒,什么都没留下…
展开
-
C# DllImport的用法
转自:http://blog.csdn.net/jame_peng/archive/2009/07/28/4387906.aspx 大家在实际工作学习C#的时候,可能会问:为什么我们要为一些已经存在的功能(比如Windows中的一些功能,C++中已经编写好的一些方法)要重新编写代码,C#有没有方法可以直接都用这些原本已经存在的功能呢?答案是肯定的,大家可以通过C#中的DllImport直接转载 2011-11-03 11:25:37 · 249 阅读 · 0 评论 -
将Excel中所有Sheet的数据导入一个DataSet
# region 将Excel中所有Sheet的数据导入一个DataSet/**//// /// 将Excel中所有Sheet的数据导入一个DataSet/// /// public static DataSet CreateDataSource(string strPath){ try { bool m_DelRow = false; string strConn =转载 2011-11-03 11:35:37 · 424 阅读 · 0 评论 -
c#serialport类实现串口通信的源代码
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.IO.Ports;using System转载 2011-11-03 12:32:57 · 930 阅读 · 0 评论 -
c#有关获取系统路径
一、系统路径可以通过 Enviroment.SystemDirectory获得 中间的参数为Environment.SpecialFolder.DesktopDirectory,这样获得桌面目录返回“我的文档”路径字符串 Environment.GetFolderPath(Environment.SpecialFolder.Personal)二、转载 2011-11-03 12:34:57 · 446 阅读 · 0 评论 -
C#生成.dat文件,并序列化与反序列化
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.IO;using System.Secur转载 2011-11-03 11:29:47 · 701 阅读 · 0 评论 -
C#最小二乘法直线拟合算法
測試數據:x23456y0.220.380.550.650.70Terminal(粗體為輸出,其它為輸入):請輸入樣本點的數目:5請輸入樣本點的坐標。x,y=2,0.22x,y=3,0.38x,y=4,0.55x,y=5,0.65x,y=6,0.70x_bar=4y_bar=0.转载 2011-11-03 12:34:31 · 6921 阅读 · 1 评论 -
无法加载DLL,找不到指定的模块
方案一:将XXXX.dll(提示找不到的组件)拷贝到项目文件夹中bin目录下方案二:把XXXX.dll(提示找不到的组件)拷贝到system32目录下方案三:使用DLLImport。 使用参考以下文章:http://www.51testing.com/?146934/action_viewspace_itemid_78925.html原创 2011-11-03 11:14:59 · 1158 阅读 · 0 评论 -
在C#中使用SerialPort类实现串口通信
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/cy757/archive/2009/08/23/4474930.aspx 在.NET Framework 2.0中提供了SerialPort类,该类主要实现串口数据通信等。本文章将本人在学习过程中从网络上搜集到的相关信息写出来供大家参考。下面主要介绍该类的主要属性(表1)和方法(表.2)。如果需转载 2011-11-03 11:39:40 · 663 阅读 · 0 评论 -
c#写入文件读出文件
C#判断硬盘上的文件是否存在方法 收藏 命名空间:System.IO第一种方法:File.Exists(Application.StartupPath + "\\AlarmSet.txt");第二种方法:System.IO.DirectoryInfo info = new System.IO.DirectoryInfo(Application.StartupPath + "\\转载 2011-11-03 12:33:41 · 435 阅读 · 0 评论