Quantcast
Channel: Ashish Khandelwal
Viewing all articles
Browse latest Browse all 100

Can I Use Generics in .NET Remoting?

$
0
0
Yes. You can expose generic types as remote objects, for example: public class MyRemoteClass<T> : MarshalByRefObject {...} Type serverType = typeof(MyRemoteClass<int>); RemotingConfiguration.RegisterWellKnownServiceType(serverType, "Some URI", WellKnownObjectMode.SingleCall); Note that the specific type arguments used must be a marshalable type, that is, either serializable or derived from MarshalByRefObject. Consequently, a generic remote type will typically place a derivation [...]

Viewing all articles
Browse latest Browse all 100

Trending Articles