I am sending a generic parameter in my Service Fabric application method via service remoting.
my Interface is as follows:
public interface IMyServiceRemoting : IService
{
Task<String> GetMessageFromServer<T>(T hint)// a hint could be of byte[] or string or any object
}
While I am getting
System.ArgumentException: "The service interface 'ServiceRemoting.Interfaces.IMyServiceRemoting`1[[System.Object, mscorlib, version = 4.0.0.0, Culture=neutral, publicKeyToken=b77a5c561934e089]]'is using generic. Generic interface cannot be remoted".
I am unable to understand why I can't use generics. Kindly help with proper explanation.