ex-19-05

来自「Programming Csharp Source Code(代码) Prog」· 代码 · 共 18 行

TXT
18
字号
// Example 19-05: Manually instantiating and associating Calculator with an endpoint

public static void Main()
{
   // create a channel and register it
   HttpChannel chan = new HttpChannel(65100);
   ChannelServices.RegisterChannel(chan);


   // make your own instance and call Marshal directly
   Calculator calculator = new Calculator();
   RemotingServices.Marshal(calculator,"theEndPoint");

   //  "They also serve who only stand and wait."); (Milton)
   Console.WriteLine("Press [enter] to exit...");
   Console.ReadLine();
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?