如何将用户名的值从1个应用程序传递到C#中的另一个应用程序_ thx-mimi

如何将用户名的值从1个应用程序传递到C#中的另一个应用程序_ thx-mimi

问题描述:

你好,

如何将用户名的值从1个应用程序传递到C#中的另一个应用程序_ thx-mimi

Hello there,

How I can pass the value of user name from 1 application to another application in C# _ thx - mimi

.NET中有许多在进程之间传递信息的方法.该选择在很大程度上取决于您所运行的.NET的版本.如果您正在运行版本2或更低版本,则您可能会考虑进行远程处理(或者可以打开连接并通过TCP进行通信).

如果它是.NET的较新版本,则可以考虑使用WCF在两个应用程序之间进行通信,其中一个充当服务器,另一个充当客户端.
There are many methods of passing information between processes in .NET. The choice, largely, depends on the version of .NET you are running. If you are running version 2 or lower, then you would probably look into remoting (or you could open up a connection and communicate via TCP).

If it''s a newer version of .NET, you could look at using WCF to communicate between the two applications, with one acting as the server and the other the client.