Use
DataContract
.
For Example:
[DataContract]
public class Result
{
[DataMember]
public List<int> ListOutPut { get;set;}
[DataMember]
public String StringOutPut { get;set;}
}
Now, use this as the return type in your contract, i.e. both in service class and its interface.
For example:
public interface IService
{
Result GetDataUsingMethodList();
}
public class Service : IService
{
public Result GetDataUsingMethodList()
{
}
}
This way, you can achieve multiple types within the output.