程序與程序之間共享對象:MarshalByRefObject

源自於:http://stackoverflow.com/questions/439173/message-pumps-and-appdomains/442316app

 

程序與程序之間共享對象:dom

MarshalByRefObject


示範代碼:
public class Container<T> : MarshalByRefObject
{
    private T _value;
    public T Value { get { return _value; } set { _value = value; } }

    public Container() { }
    public Container(T value) { Value = value; }

    public static implicit operator T(Container<T> container)
    {
        return container.Value;
    }
}
相關文章
相關標籤/搜索