I assume that by “external application” you mean something that is outside the scope of the C # code process space. Also, I assume that you do not mean C # events that are not a concept that exists outside of the .NET implementation domain - they are not accessible from outside the code.
So the general answer to this question is “yes, it’s possible”, but since you are essentially trying to send notifications about the interprocess process, you will need to use some kind of IPC Engine .
.NET has a rich API for IPC implementation, from named pipes to DCOM, to low-level network protocols such as TCP / IP. Which approach you use depends on the environment in which this process should interact (on one machine, through machines on an intranet, over the Internet, etc.). It will also depend on what information you exchange and how much effort you are willing to spend. For .NET 3.5 applications, you can usually find a supported implementation using WCF as a unifying environment .
Obviously, it all depends on your ability to modify the implementation (read the source code) of the .NET application that you are trying to raise an event inside. If you cannot do this and there is no existing IPC mechanism in this code, you are probably stuck.
UPDATE: in response to your comment:
What would you recommend with a priority of ease and time. Both applications run on the same computer, and I write them to both
I would consider using Named Pipes . Named pipes are originally a Unix concept, but they are also available on Windows. They have a simple programming interface (they are similar to working with files) and do not require much for use in a single-computer scenario.
On the Ruby side (which I'm least familiar with), here are a few links you might find useful:
On the .NET side, here are some relevant links for more details:
Lbushkin
source share