public static void Main()
        {
            // Create an instance of MyProxy.
            MyProxy myCustomProxy = new MyProxy(typeof(CustomServer));
            // Get an instance of remote class.
            CustomServer myHelloServer =
                (CustomServer)myCustomProxy.GetTransparentProxy();
            double myDoubleValue = 10.5;
            int    myIntValue    = 200;

            // Invoke the remote method.
            myHelloServer.HelloMethod("Hello", ref myDoubleValue, out myIntValue);
        }
Beispiel #2
0
        public static void Main()
        {
            // Create an instance of MyProxy.
            MyProxy myCustomProxy = new MyProxy(typeof(CustomServer));
            // Get an instance of remote class.
            CustomServer myHelloServer = (CustomServer)myCustomProxy.GetTransparentProxy();

            try
            {
                // Invoke remote method.
                myHelloServer.RaiseException();
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception: " + e.Message);
            }
        }