【发布时间】:2017-08-21 14:15:32
【问题描述】:
我正在通过服务远程处理在我的 Service Fabric 应用程序方法中发送一个通用参数。
我的界面如下:
public interface IMyServiceRemoting : IService
{
Task<String> GetMessageFromServer<T>(T hint)// a hint could be of byte[] or string or any object
}
当我得到的时候
System.ArgumentException:“服务接口 'ServiceRemoting.Interfaces.IMyServiceRemoting`1[[System.Object, mscorlib, version = 4.0.0.0, Culture=neutral, publicKeyToken=b77a5c561934e089]]'正在使用泛型。通用接口无法远程"。
我无法理解为什么我不能使用泛型。 请帮助正确解释。
【问题讨论】:
标签: c# azure generics azure-service-fabric .net-remoting