Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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)
&


Ïà¹ØÎĵµ£º

Paging long articles in ASP.NET using C#

Paging long articles in ASP.NET using C#
Long articles are better broken into bite-sized chunks over several pages. With static HTML, this is easily achieved by dividing the article into logical separations and creating separate .htm files for each. Here's how to do it using C# for an article that ......

C# Á¬½áaccess

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.OleDb;
/// <summary>
/// DB µ ......

´íÎó¼Ç¼£ºASP.NET(C#)ÖÐδÄܼÓÔØ×Ô¶¨ÒåÀàÐÍ£¨Àࣩ

»·¾³£ºASP.NET(C#)£¬Visual Studio 2010¡£
Ìáʾ£ºÎ´ÄܼÓÔØÀàÐÍ“EMS.App_Code.PersonalInfo”¡£Èç¹û¸ÃÀàÐÍλÓÚApp_CodeÎļþ¼ÐÖУ¬Çë¼ì²éËüÊÇ·ñÒѱàÒë¡£Èç¹û¸ÃÀàÐÍλÓÚÒѱàÒëµÄ³ÌÐò¼¯ÖУ¬Çë¼ì²é¸Ã³ÌÐò¼¯ÊÇ·ñ±»¸ÃÏîÄ¿ÒýÓá£
´¦Àí£º
×Ô¼º×öµÃÒ»¸öС³ÌÐò£¬È¡ÃûEMS£¬²¢ÔÚApp_CodeÎļþ¼ÐϽ¨Á¢ÁËÀàPersonalInfo¡¢Sal ......

ÔÚC#ÖÐÔËÓÃ SQLite

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