Hello.
I am trying to overload a method so that I have four possible working
copies. The only difference between the four methods is what to search by
and in what manner to return the results. So I have the following.
public static ArrayList GetRoles(int userID)
public static ArrayList GetRoles(string username)
public static string GetRoles(int userID) // Error 1
public static string GetRoles(string username) // Error 2
But I am receiving the following errors.
Error 1.
C:\Projects\acmsproject\trunk\acms\source\DataAcce ss\DatabaseAccess.cs(117):
Class 'acms.DataAccess.DatabaseAccess' already defines a member called
'GetRoles' with the same parameter types
Error 2.
C:\Projects\acmsproject\trunk\acms\source\DataAcce ss\DatabaseAccess.cs(120):
Class 'acms.DataAccess.DatabaseAccess' already defines a member called
'GetRoles' with the same parameter types
How can I overload these methods to provide the functionality that I want.
Thanks in advance.
Ryan Taylor