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

C#±àдCom×é¼þ

1¡¢Ð½¨Ò»¸öÀà¿âÏîÄ¿
2¡¢½«Class1.cs¸ÄΪÎÒÃÇÏëÒªµÄÃû×Ö
ÎÊÊÇ·ñͬʱ¸øÀà¸ÄÃû£¬È·¶¨
3¡¢ÐÞ¸ÄPropertiesĿ¼ÏÂÃæµÄAssemblyInfo.cs
ComVisibleÊôÐÔÉèÖÃΪTrue
4¡¢ÏîÄ¿²Ëµ¥->MyLibÊôÐÔ
ÕÒµ½“Éú³É”Ñ¡Ï
ÍùÏ¿´£¬ÕÒµ½“Ϊ COM Interop ×¢²á”¹´ÉÏ
5¡¢¼ÌÐøÍùÏ£¬ÕÒµ½“Ç©Ãû”Ñ¡Ï
  ¹´ÉϓΪ³ÌÐò¼¯Ç©Ãû”
  ÔÚÏÂÃæµÄÏÂÀ­¿òÀïÃæÑ¡Ôñ“ <н¨...>”
6¡¢ÔÚµ¯³öµÄ¶Ô»°¿òÀïÃæ£¬ÊäÈëMyLib¡£¡£»òÕßËæ±ãÈ¡¸öÃû×Ö
  È¥µôʹÓÃÃÜÂë±£»¤ÎļþµÄÑ¡Ïî
7¡¢¿ªÊ¼±àÂ룬ÈκÎÒ»¸ö¹«¿ªµÄÀ࣬±ØÐëÓÐÒ»¸ö I¿ªÍ¨µÄ½Ó¿Ú¶¨Òå
C# code
 
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
 
namespace MyLib
{
    [ComVisible(true)]
    [Guid("2CBD3D76-35F1-4f9d-9C1B-9DBFEE412F76")]
    public interface IMyClass
    {
        void Initialize();
        void Dispose();
        int Add(int x, int y);
    }
    [ComVisible(true)]
    [Guid("EA2F140A-108F-47ae-BBD5-83EEE646CC0D")]
    [ProgId("MyLib.MyClass")]
    public class MyClass : IMyClass
    {
        public void Initialize()
        {
            //nothing todo
        }
        public void Dispose()
        {
            //nothing todo
        }
        public int Add(int x, int y)
&


Ïà¹ØÎĵµ£º

C# wordת»»³ÉHTML

C# wordת»»³ÉHTML
Ìí¼ÓcomÒýÓÃMicrosoft word 11.0 Object Library
Ìí¼Óusing System.Threading;using System.IO;
       //ʵÀý»¯Ò»¸öWord
        Microsoft.Office.Interop.Word.ApplicationClass appclass = new Microsoft.Office.Inter ......

asp.net(c#)ÍøÒ³Ìø×ªÆßÖÖ·½·¨

1.Response.Redirect("http://www.jb51.net",false);
Ä¿±êÒ³ÃæºÍÔ­Ò³Ãæ¿ÉÒÔÔÚ2¸ö·þÎñÆ÷ÉÏ£¬¿ÉÊäÈëÍøÖ·»òÏà¶Ô·¾¶¡£ºóÃæµÄboolֵΪÊÇ·ñÍ£Ö¹Ö´Ðе±Ç°Ò³¡£
Ìø×ªÏòеÄÒ³Ãæ£¬Ô­´°¿Ú±»´úÌæ¡£"
ä¯ÀÀÆ÷ÖеÄURLΪз¾¶¡£
:Response.Redirect·½·¨µ¼ÖÂä¯ÀÀÆ÷Á´½Óµ½Ò»¸öÖ¸¶¨µÄURL¡£µ±Response.Redirect()·½·¨± ......

ÔÚC#ÖÐÔËÓÃ SQLite

¡¡¡¡SQLite ÊÇÒ»¸öǶÈëʽµÄÁªÏµÊý¾Ý¿âϵͳ£¬ÔËÓÃÊ®·Ö¹ã·º¡£ÔÚһЩÊý¾ÝÁ¿²»´óµÄÔËÓà ³ÌÐòÖУ¬¼ÙÈçÔËÓà SQLite¿ÉÒÔ¼«´óµÄ½µµÍ²¿ÊðʱµÄ¹¤×÷Á¿¡£ ÒªÔÚC#ÖÐÔËÓà SQLiteÒ²ºÜ»ù±¾£¬Ö»ÒªÕÒÒ»¸öC#µÄwrapper¾Í¿ÉÒÔÁË£¬ÀýÈ磬ÎÒÔËÓõľÍÊÇÀ´×Ô
¡¡¡¡http://sqlite.phxsoftware.com/¡¡ µÄÒ»¸ödll£¬System.Data.SQLite. ÏÂÔØÏÂÀ´µÄÎļþÊÇ ......

Êý¾Ý½»»»Ñ§Ï°¶þ£ºasp.net C# ¶Ô sqlserver±íµÄ²Ù×÷

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient; ......

C#·¢ÅÆ

֮ǰ²»Ì«Ï²»¶C#£¬ÎÞÒâÖз¢ÏÖlinq,ÓÃÀ´ÊµÏÖÅÅÐòÊÇÈç´Ë¼òµ¥£¬ËùÒÔÓÖÓÃC#дÁË±é·¢ÅÆ³ÌÐò
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
    class Program
    {
      &nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ