What is the easiest way to do inter process communication in C#? [closed]

I have two C# applications and I want one of them send two integers to the other one (this doesn't have to be fast since it's invoked only once every few seconds).

What's the easiest way to do this? (It doesn't have to be the most elegant one.)


Solution 1:

The easiest and most reliable way is almost certainly IpcChannel (a.k.a. Inter Process Communication Channel); that's what it's there for. You can get it up and running with a couple of lines of code and configuration.

Solution 2:

You can try .NET Remoting. Here is a simple example: CodeProject .NET Remoting.

If you are using .NET 3.5, you should go for WCF, as Remoting is slowly becoming obsolete. Again, there are many examples for WCF around.