Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C#²Ù×÷AccessÀà Re

using System;
using System.Data;
using System.Data.OleDb;
namespace AccessDb
{
/**//// <summary>
/// AccessDb µÄժҪ˵Ã÷£¬ÒÔÏÂÐÅÏ¢ÇëÍêÕû±£Áô
/// ÇëÔÚÊý¾Ý´«µÝÍê±Ïºóµ÷ÓÃClose()·½·¨£¬¹Ø±ÕÊý¾ÝÁ´½Ó¡£
/// </summary>
public class AccessDbClass
{
±äÁ¿ÉùÃ÷´¦#region ±äÁ¿ÉùÃ÷´¦
public OleDbConnection Conn;
public string ConnString;//Á¬½Ó×Ö·û´®
#endregion
¹¹Ô캯ÊýÓëÁ¬½Ó¹Ø±ÕÊý¾Ý¿â#region ¹¹Ô캯ÊýÓëÁ¬½Ó¹Ø±ÕÊý¾Ý¿â
/**//// <summary>
/// ¹¹Ô캯Êý
/// </summary>
/// <param name="Dbpath">ACCESSÊý¾Ý¿â·¾¶</param>
public AccessDbClass(string Dbpath)
{
ConnString = "Provider=Microsoft.Jet.OleDb.4.0;Data Source=";
ConnString += Dbpath;
Conn = new OleDbConnection(ConnString);
Conn.Open();
}
/**//// <summary>
/// ´ò¿ªÊý¾ÝÔ´Á´½Ó
/// </summary>
/// <returns></returns>
public OleDbConnection DbConn()
{
Conn.Open();
return Conn;
}
/**//// <summary>
/// ÇëÔÚÊý¾Ý´«µÝÍê±Ïºóµ÷Óøú¯Êý£¬¹Ø±ÕÊý¾ÝÁ´½Ó¡£
/// </summary>
public void Close()
{
Conn.Close();
}
#endregion
Êý¾Ý¿â»ù±¾²Ù×÷#region Êý¾Ý¿â»ù±¾²Ù×÷
/**//// <summary>
/// ¸ù¾ÝSQLÃüÁî·µ»ØÊý¾ÝDataTableÊý¾Ý±í,
/// ¿ÉÖ±½Ó×÷ΪdataGridViewµÄÊý¾ÝÔ´
/// </summary>
/// <param name="SQL"></param>
/// <returns></returns>
public DataTable SelectToDataTable(string SQL)
{
OleDbDataAdapter adapter = new OleDbDataAdapter();
OleDbCommand command = new OleDbCommand(SQL, Conn);
adapter.SelectCommand = command;
DataTable Dt = new DataTable();
adapter.Fill(Dt);


Ïà¹ØÎĵµ£º

תÌû£º¾²Ì¬ÀàºÍ¾²Ì¬Àà³ÉÔ±£¨C# ±à³ÌÖ¸ÄÏ£©

Ô­ÎĵØÖ·£ºhttp://msdn.microsoft.com/zh-cn/library/79b3xss3(VS.80).aspx
    ¾²Ì¬ÀàºÍÀà³ÉÔ±ÓÃÓÚ´´½¨ÎÞÐè´´½¨ÀàµÄʵÀý¾ÍÄܹ»·ÃÎʵÄÊý¾ÝºÍº¯Êý¡£¾²Ì¬Àà³ÉÔ±¿ÉÓÃÓÚ·ÖÀë¶ÀÁ¢ÓÚÈκζÔÏó±êʶµÄÊý¾ÝºÍÐÐΪ£ºÎÞÂÛ¶ÔÏó·¢Éúʲô¸ü¸Ä£¬ÕâЩÊý¾ÝºÍº¯Êý¶¼²»»áËæÖ®±ä»¯¡£µ±ÀàÖÐûÓÐÒÀÀµ¶ÔÏó±êʶµÄÊý¾Ý»òÐÐΪʱ£¬ ......

ASP.NETÑéÖ¤Âë(C#)

* Copyright all(c) 2005 ZhongFeng, http://blog.csdn.net/SW515 */
 public class ValidateCode : System.Web.UI.Page
 {
  private void Page_Load(object sender, System.EventArgs e)
  {
   this.CreateCheckCodeImage(GenerateCheckCode());
  }
&nb ......

C#ÖÐʹÓÃWIN32º¯ÊýµÄ»Øµ÷º¯Êý

ÍêÉÆÁË“ÈçºÎÔÚC#ÖÐʹÓÃWin32ºÍÆäËû¿â”ÖйØÓÚEnumDesktops()º¯ÊýµÄ»Øµ÷´úÂ룬¿ÉÔËÐС£
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
namespace ConsoleApplication1
{
class Program
{
delegate bool EnumDesk ......

¡¶Visual C# ×î¼Ñʵ¼ù¡·µÚÒ»Õ ³ÌÐòÉè¼Æ (Ò»)


µÚÒ»Õ ³ÌÐòÉè¼Æ
¡¡¡¡“ÒªÏë³ÉΪÕæÕýµÄ³ÌÐòÔ±£¬ÎÒÃÇÐèÒª½øÐÐÒ»³¡Ï´Àñ¡£”
¡¡¡¡“³ÌÐò = Êý¾Ý½á¹¹ + Ëã·¨¡£”ÕâÑùµÄ¹«Ê½ºÜ¾«±Ù£¬ËüÔ½¹ýÁ˱í²ãÖ±½ÓÃèÊöÁ˳ÌÐòµÄ±¾ÖÊ¡£²»½öÈç´Ë£¬ÕâÑù¼¸¸ö¼òµ¥µÄµ¥´ÊÒ²ÈÃÎÒÃÇÃ÷°×“ÎÒÃÇÓ¦¸ÃѧϰʲôÄÚÈÝ£¿”¡£ÈËÃÇ×öÈκÎʶ¼ÓÐÒ»¶¨µÄ³ÌÐò£¬Ö»ÊÇûÓÐÒâʶµ½¡£Ó ......

C#ÏÂʵÏÖË«»º³åÃè»­¸ßƵÇúÏß(GDI+½áºÏGDI)

ÓÉÓÚÏîÄ¿ÐèÒª,ҪʹÓÃc#Ãè»­¸ßƵʵʱÇúÏß.
µ«ÊÇÔÚC#ÏÂÓÉÓÚÃ軭ͼÏñʹÓõÄÊÇGDI+,Ã軭ЧÂʺÜÓÐÎÊÌâ.Ò»µ©ÇúÏßÌ«¶à,¾Í»áÔì³ÉCPUʹÓÃÂÊÖ±ÏßÉÏÉý,ÂíÉÏì­Éýµ½100%.
ÔÚGDI+ÏÂʹÓÃË«»º³åÒ²ÎÞ¼ÃÓÚÊÂ,Ë«»º³å±¾ÉíÖ»»á½â¾öÇúÏ߶àµÄʱºòÈ«ÆÁÉÁ˸ÎÊÌâ,µ«Ã軭ЧÂÊ»¹ÊÇÑÏÖصÍÏÂ.
Æä¼äÓùý¶àÖÖ½â¾ö·½°¸:DRECT3D,DRIRECT2D,GDI,,,,,µÈµÈµÈµÈ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ