Click here to Skip to main content
15,896,063 members
Articles / Programming Languages / C#

.NET Remoting with an Easy Example

Rate me:
Please Sign up or sign in to vote.
4.91/5 (193 votes)
12 Jul 200623 min read 1M   44.1K   470  
.NET remoting explained with a simple example
This article tries to cover all aspects of remoting in a brief way, where the sample project is a very simple example of remoting.
using System;

namespace RemotableObjects
{

	public class Cache
	{
		private static Cache myInstance;
		public static IObserver Observer;

		private Cache()
		{

		}
		
		public static void Attach(IObserver observer)
		{
			Observer = observer;
		}
		public static Cache GetInstance()
		{
			if(myInstance==null)
			{
				myInstance = new Cache();
			}
			return myInstance;
		}
		public string MessageString
		{
			set 
			{
				Observer.Notify(value);
			}
		}
	}
}

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.


Written By
Software Developer
Pakistan Pakistan
Nadeem ul hassan is working as a software engineer in softteams Islamabad.

Comments and Discussions