![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
DotNet Blog
czhrf
这个作者很懒,什么都没留下…
展开
-
创建XML文件
创建XML文件的多种方法:(首先都要加上语句: using System.Xml;)创建如下格式XML文件: xml version="1.0" encoding="gb2312"?>bookstore> book ISBN="2-3631-4" genre="fantasy"> title>C# Programtitle> author>Michaelauthor>原创 2006-11-23 11:38:00 · 577 阅读 · 0 评论 -
一个操作线程的类
下面是一个操作线程的类,具体的参数可以修改.可以利用属性来返回值.using System;using System.Threading;using System.IO;namespace IconMes.ReadFile...{ /**//// /// ThreadClass 的摘要说明。 /// public class ThreadClass ...原创 2006-12-20 17:31:00 · 480 阅读 · 0 评论 -
定时器的使用
下面是一段定时器使用的代码://开始读取事件 private void btRead_Click(object sender, System.EventArgs e) ...{ btRead.Enabled = false; btStopRead.Enabled = true; fileClass原创 2006-12-14 11:12:00 · 573 阅读 · 0 评论 -
WinForm中使用配置文件连接数据库
在WinForm中使用配置文件连接Oracle数据库:建立应用程序配置文件:App.config xml version="1.0" encoding="utf-8" ?>configuration> appSettings> add key="DatabaseConnection" value="user id=cmes;data source=SHACIIC原创 2006-12-14 10:55:00 · 3650 阅读 · 0 评论 -
连接局域网共享目录
第一次连接局域网计算机时,自动填写用户,密码进行登陆,以后就不需在连接了.//连接网络计算机 private void ConnectRemoteMachine(string folder,string userName,string password) ...{ Process process1 = new Process();原创 2006-12-14 10:49:00 · 705 阅读 · 0 评论 -
从AssemblyInfo.cs里获得信息
AssemblyInfo.cs文件代码片段: [assembly: AssemblyTitle("")][assembly: AssemblyDescription("")][assembly: AssemblyConfiguration("")][assembly: AssemblyCompany("")][assembly: AssemblyProduct("飞鼠工作室")][as原创 2006-12-19 14:55:00 · 1276 阅读 · 0 评论 -
url传递中文的解决方案
url传递中文的解决方案 1.设置web.config文件。(我不喜欢设置成这样) ...... ...... 2.传递中文之前,将要传递的中文参数进行编码,在接收时再进行解码。 >> 进行传递 string Name = "中文参数"; Response.Redirect("B.aspx?Name="+Server.UrlEncode(Name)); >> 进行接收 string Na转载 2006-12-06 10:48:00 · 552 阅读 · 0 评论 -
ASP.NET中的三种编译方法
假设虚拟目录为G:/Mydotnetsite/,在此目录下建一个名为bin文件夹(/bin目录必须是你的应用程序根目录的直接子目录。在默认情况下是/wwwroot/bin/,但是,如果你的应用程序被包含在一个虚拟目录中,那么必须在虚拟目录的根目录中创建/bin目录)用于存放被编译后的dll文件.在安装好.Net Framework的情况下,将.cs或.vb文件编译成dll文件的方法有3种:转载 2006-11-29 11:19:00 · 1478 阅读 · 0 评论 -
net中多种排序算法
冒泡,选择,插入,快速排序:using System;using System.Data;namespace sortMethod...{ public class MainClass...{ protected static int no=0; static void Main()...{ int[] arr; arr=new int[]...{7,3转载 2006-11-28 11:22:00 · 608 阅读 · 0 评论 -
不断访问博客网站
这个程序实现了不断访问一个网站的功能,这样可以增加网站的访问量,实现了最小化到系统托盘的功能. using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.N原创 2006-11-23 18:42:00 · 504 阅读 · 0 评论 -
C#读写文本文件
读取文本文件: public string GetTxtContents(string file) ...{ StringBuilder allText = new StringBuilder(); StreamReader sr = null; try ...{ sr = new StreamReader(file,System.Text.Encoding.原创 2006-11-23 14:08:00 · 904 阅读 · 0 评论 -
C#中读写INI文件
INI文件就是扩展名为“ini”的文件。在Windows系统中,INI文件是很多,最重要的就是“System.ini”、“System32.ini”和“Win.ini”。该文件主要存放用户所做的选择以及系统的各种参数。用户可以通过修改INI文件,来改变应用程序和系统的很多配置。但自从Windows 95的退出,在Windows系统中引入了注册表的概念,INI文件在Windows系统的地位就开始不断转载 2006-11-23 13:24:00 · 517 阅读 · 0 评论 -
net调用远程机器上的WebService
当我们不在本机上部署webservice时,我们调用webservice时会出错,原因在于.Net Framework1.1默认不支持HttpGet和HttpPost,我们在web.config文件中增加以下代码即可. webServices> protocols> add name="HttpPost"/> add name原创 2006-11-23 11:51:00 · 438 阅读 · 0 评论 -
vs.net中web services入门
Visual Studio .NET 中的 XML Web services 入门 摘要:Microsoft® Visual Studio® .NET 和 XML Web services 提供了一个简单、灵活且基于标准的模型,开发人员无论使用何种平台、编程语言或对象模型均可以编写组合应用程序。本文将帮助您快速学习使用 Visual Studio .NET 创建并访问 XML Web serv转载 2006-11-23 11:43:00 · 808 阅读 · 0 评论 -
取得第二大数
using System;public class SecMax...{ //record the second max number private static int secMax = Int32.MinValue; //does the list has second max number private static bool HasSecMax(int[]原创 2007-01-11 10:05:00 · 705 阅读 · 0 评论