I am developing a client-server application using .Net Remoting. From my server I want to return a List in response to a certain method call, however I get an exception saying that basically SoapFormatter cannot deal with generics. I need a workaround so that I am able to work with generics, or direction on how to use XmlSerializer or DataContractSerializer.
相关问题
- Generic Generics in Managed C++
- Caugth ClassCastException in my Java application
- How can you use weak references in Swift generic d
- Create a generic list in xaml 4.5+
- Calling Method on Generic Type Java 8
相关文章
-
What is the difference between
and in java - C# generics class operators not working
- Generics and calling overloaded method from differ
- Java Generics: How to specify a Class type for a g
- Can you use generic methods in a controller?
- VS Designer error: GenericArguments[0], 'X'
- Extension methods for specific generic types
- Including a generic class in Unity App.Config file
That's cause they didn't add any additional support for the SoapFormatter and generics in .NET 2.0. A quick workaround would be to pass the List to the client as an array.
If you must use Generics (personally I'd consider upgrading this to WCF), there are some examples on how to do so in the MSDN remoting examples.