I would like to create three method with same method name and parameter which
public async Task <ObjectResponse> GenericMethod (object job) {
return AObject.method(job). // where AObject.method(job) is return ObjectResponse
}
public async Task <TResult> GenericMethod<TResult> (object job) where TResult : new() {
return BObject.method<TResult>(job) ?? new TResult(); // where BObject.method(job) is return Generic Type
}
public async Task <string> GenericMethod<String> (object job) {
return CObject.method(job); // where CObject.method(job) is return string
}
I ve got the error on
public async Task <String> GenericMethod<String> (object job) {
return something..
}
where is said the same signature is already declared, how do it fix it, as I don't want to use the other method name to do
Thank you