posts - 3,  comments - 7,  trackbacks - 0
  2007年3月7日
     摘要: 使用IIS作为WCF Service的宿主  阅读全文
posted @ 2007-03-07 23:39 Cooldog's .NET Space 阅读(1129) | 评论 (7)编辑
  2006年2月13日

来自CSDN的新闻:

Borland计划出售其IDE部门,买家尚未确定
http://news.csdn.net/n/20060209/86465.html

还记得经典的pascal 、Delphi 、BCB,吸引了众多的BORLAND迷,现在BORLAND要走了,不免有些感慨。发此贴纪念BORLAND。

posted @ 2006-02-13 12:44 Cooldog's .NET Space 阅读(100) | 评论 (0)编辑
  2006年1月16日

一个exe中可以调用另一个exe,或另一个exe的方法:
-------------用程序域实现:
AppDomain 类用于创建和中断应用程序域。

1建立控制台AssemblyA

 1using System;
 2
 3namespace Wrox.ProCSharp.Assemblies.AppDomains
 4{
 5 class Class1
 6 {
 7  public Class1(int val1, int val2)
 8  {
 9   Console.WriteLine("Constructor with the values {0}, {1}" +
10    " in domain {2} called", val1, val2,
11    AppDomain.CurrentDomain.FriendlyName);
12  }

13  [STAThread]
14  static void Main(string[] args)
15  {
16   Console.WriteLine("Main in domain {0} called",
17    AppDomain.CurrentDomain.FriendlyName);
18  }

19 }

20}

21
产生。exe。
2建立控制台DomainTest

 1using System;
 2namespace Wrox.ProCSharp.Assemblies.AppDomains
 3{
 4    class Test
 5    {
 6        [STAThread]
 7        static void Main(string[] args)
 8        {
 9            AppDomain currentDomain = AppDomain.CurrentDomain;
10            Console.WriteLine(currentDomain.FriendlyName);
11            AppDomain secondDomain = 
12                AppDomain.CreateDomain("New AppDomain");
13        //    secondDomain.ExecuteAssembly("AssemblyA.exe");
14            secondDomain.CreateInstance("AssemblyA"
15                "Wrox.ProCSharp.Assemblies.AppDomains.Class1"true,
16                System.Reflection.BindingFlags.CreateInstance,
17                nullnew object[] {73}nullnullnull);
18
19        }

20    }

21}

22
结果:
DomainTest.exe
Constructor with the values 7, 3 in domain New AppDomain called
Press any key to continue

DomainTest.exe
Constructor with the values 7, 3 in domain New AppDomain called
Press any key to continue


---------------------

用程序集的反射也可以实现一个exe调用另一个exe的方法!
:system.Type 可以访问任何给定的数据类型的信息
:system.Assembly访问给定程序集的元数据,也可以加载和执行程序集的方法
posted @ 2006-01-16 13:04 Cooldog's .NET Space 阅读(70) | 评论 (0)编辑