© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
7 replies
RonTheDon

❔ function overloading with Type as parameter.

Hello

i have this function :
public string remoteCall(string Namespace, string Class, string Function, params object[] p)
public string remoteCall(string Namespace, string Class, string Function, params object[] p)


real example :
remoteCall("Cus", "Customer", "GetCustomerTransactions", 123, "2020-01-01", "2021-01-01")
remoteCall("Cus", "Customer", "GetCustomerTransactions", 123, "2020-01-01", "2021-01-01")

123 being the id and a range of dates.

i would like to be able to overload the
remoteCall
remoteCall
function in a way that it would suggest the id and the 2 dates instead of it being a
params object[]
params object[]
.

something like this:
public string remoteCall(Cus.Customer.GetCustomerTransactions, int Id, string date1, string date2)
public string remoteCall(Cus.Customer.GetCustomerTransactions, int Id, string date1, string date2)


so that when i type
Cus.Customer.GetCustomerTransactions
Cus.Customer.GetCustomerTransactions
as the first param, visual studio automatically suggests Id, date1 and date2 as the possible params.

is this even possible? ty
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Pass DateTime.Add function as parameter
C#CC# / help
4y ago
❔ Pass variable type as class parameter
C#CC# / help
3y ago
❔ Class with parameter as a generic parameter
C#CC# / help
4y ago
Type as Parameter, and string[] from Linq
C#CC# / help
4y ago