Click here to Skip to main content
Click here to Skip to main content
Articles » Languages » C# » Beginners » Downloads
 
Add your own
alternative version

Dot Remoting - Server Activated, SingleCall Technique

, 11 Jan 2011 CPOL
Shows how you can create remote objects and access it from client. Here, it is server activated single call technique
RemotingEx01.zip
ConServer
ConServer
bin
Debug
ConServer.exe
ConServer.vshost.exe
ClassDiagram1.cd
Properties
RemClient
RemClient
bin
Debug
ConServer.exe
RemClient.exe
RemClient.vshost.exe
Properties
Settings.settings
using System;
using System.Collections.Generic;
using System.Text;

namespace ConServer
{
    //RemoteServer_018: Make the Class Serializable
    [Serializable()] 
    public class LastTrans
    {
        //RemoteServer_011: Private field for the Newly added class
        private int LastDeposit;
        private int LastWithdraw;

        //RemoteServer_012: Constructor for Last Transactions. At present we will
        //Default it to some constant value
        public LastTrans()
        {
            //Hard Coded here. In real world make a query to the Database to get 
            //the latest information.
            LastDeposit = 68800;
            LastWithdraw = 12000;
        }

        //RemoteServer_013: Get the Last Transaction amount
        public int GetLastDeposit()
        {
            Console.WriteLine("Last deposit Queried...");
            return LastDeposit;
        }

        public int GetLastWithdraw()
        {
            Console.WriteLine("Last Withdrawl amount Queried...");
            return LastWithdraw;
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Sivaraman Dhamodharan
Software Developer iSOFT
India India
I am working as software engineer in iSOFT R&D. I have been come accross C++,MFC, .net technologies. I do like playing video games, reading books.
 

Web: www.mstecharticles.com


| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150224.1 | Last Updated 12 Jan 2011
Article Copyright 2011 by Sivaraman Dhamodharan
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid