`
文章列表
using System;using System.Data;using System.Data.SqlClient;using System.IO;using System.Text; namespace CardTest1{public class DB{   public DB()   {   }   private SqlConnection conn;//连接对象   private SqlCommand cmd;//命令对象   private SqlDataAdapter sda;//适配器对象   private SqlDataReader dr;//数据读取器对象   priv ...
连接池添加以下引用System.EnterpriseServicesSystem.Runtime.Remoting using System;using System.IO;using System.Text;using System.Reflection;using System.Runtime.InteropServices;using System.EnterpriseServices; [assembly: ApplicationName("POOLINGTEST")][assembly: AssemblyKeyFile(" ...
private ConnClass.SqlConn sql;          private ConnClass.SqlConn sql2 = new ConnClass.SqlConn();          private string connectionString;          private bool bl = false;          public static bool visable = false;                   private void Form1_Load(object sender, EventArgs e)          {   ...
using System; namespace 排序算法{class Class1{   static void Main(string[] args)   {    int[] arr = new int[]{49,38,65,97,76,13,27,49};    int i;     System.Console.WriteLine("排序前");    for(i=0; i<arr.Length; i++)     System.Console.WriteLine(arr[i]);     simpleSelectionSorting(arr, arr.Leng ...
using System; namespace 查找算法{class Class1{   static void Main(string[] args)   {    int[] arr = new int[]{1,3,5,6,7,8,9};    int key=80;    int retValue;     retValue = binarySearching(arr, 0, arr.Length-1, key);     if(retValue==-1)     System.Console.WriteLine("{0} 在查找表中不存在", key);    els ...
The following example shows the use of Regular Expresssions in C#.This program has basic validation scripts for validation easily useable in all programs./*csc /r:System.Text.RegularExpressions.dll,System.dll Validation.cs */using System.Text.RegularExpressions;using System;class Validation{public st ...
poorServer 代码 using System;using System.IO;using System.Text;using System.Reflection;using System.Runtime.InteropServices;using System.EnterpriseServices; [assembly: ApplicationName("POOLINGTEST")][assembly: AssemblyKeyFile("poolserver.snk")] namespace PoolServer{[ObjectPooli ...
利用dns类和WMI规范获取IP及MAC地址在C#编程中,要获取主机名和主机IP地址,是比较容易的.它提供的Dns类,可以轻松的取得主机名和IP地址.示例:string strHostName = Dns.GetHostName();   //得到本机的主机名IPHostEntry ipEntry = Dns.GetHostByName(strHostNa ...
PagedDataSource pds=new PagedDataSource();           //设置分页对象的数据源            pds.DataSource=dataSet11.Tables["leaveWords"].DefaultView;           //启用分页功能           pds.AllowPaging=true;           //每页4行           pds.PageSize=4;           //当前页号           int CurrentPageNo;            ...
if(TextBoxNumber1.Text=="")           LabelMessage.Text="<script language='Jscript'> "+              "alert('您必须输入账号才能取回密码!');</script>";         else         {           //取用户输入的账号           string number=TextBoxNumber1.Text;           SqlCommand myCommand ...
<FONT size=2><%@ Page Language="<a href="http://dev.21tx.com/dotnet/csharp/" target="_blank">C#</a>" AutoEventWireup="True" %><%@ Import Namespace="System.Data" %><html><script runat="server">int sta ...
用AxWebBrowser的准备 "工具箱"->"添加/删除项"->"COM 组件"->"Microsoft Web 浏览器"->对勾->确定 IE样的东西就上到工具箱上了,拖过来即可使用   我们知道,C#创建基于Web页(Html)的AspC#应用程序,它使用Microsoft Internet Explorer(IE)实现页面的导航与浏览,对程序的导航控制通过IE自身提供的功能来实现,这个时候,导航控制实际上与程序代码是相对独立的,这表现在你不需要为此编制相应的代码也很难添加IE ...
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using Microsoft.Office.Interop.Excel;using System.Data.SqlClient;using System.Data.OleDb;using System.Reflection;namespace ExcelPrj{/// <sum ...
using System;using System.Collections.Generic;using System.Linq;using System.Windows.Forms;using Microsoft.Win32;using System.Diagnostics; namespace MovSysSht{    static class Program    {        /// <summary>        /// The main entry point for the application.        /// </summary>      ...
string path = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal).ToString();//获取当前用的MyDocument文件夹 //保存到excel 2007中        private void saveToExcel()        {            try            {               ...
Global site tag (gtag.js) - Google Analytics