R
Raed Sawalha
I have webservice and I need to overload a method but when overloading the
method as following i got error message written below:
[WebMethod(Description="Gets the number of files in the User subfolder that
has that Type name")]
public int MessageCount (string User,string Type )
{
MsgWebService.Utility.UserFolder oUserFolder = new
MsgWebService.Utility.UserFolder(User);
string[] saFiles = oUserFolder.GetSubfolderFilesName(Type);
return (saFiles == null)? 0 : saFiles.Length ;
}
[WebMethod(Description="Gets the number of files in the User subfolder that
has that Type name")]
public int MessageCount (string User,string Type,string userId)
{
MsgWebService.Utility.UserFolder oUserFolder = new
MsgWebService.Utility.UserFolder(userId.Substring(0,4),userId);
string[] saFiles = oUserFolder.GetSubfolderFilesName(Type);
return (saFiles == null)? 0 : saFiles.Length ;
}
The Error :
*********
Both Int32 MessageCount(System.String, System.String, System.String) and
Int32 MessageCount(System.String, System.String) use the message name
'MessageCount'. Use the MessageName property of the WebMethod custom
attribute to specify unique message names for the methods.
Why I'm getting this error? I dont understand from the message what should I
do?
any help please?
method as following i got error message written below:
[WebMethod(Description="Gets the number of files in the User subfolder that
has that Type name")]
public int MessageCount (string User,string Type )
{
MsgWebService.Utility.UserFolder oUserFolder = new
MsgWebService.Utility.UserFolder(User);
string[] saFiles = oUserFolder.GetSubfolderFilesName(Type);
return (saFiles == null)? 0 : saFiles.Length ;
}
[WebMethod(Description="Gets the number of files in the User subfolder that
has that Type name")]
public int MessageCount (string User,string Type,string userId)
{
MsgWebService.Utility.UserFolder oUserFolder = new
MsgWebService.Utility.UserFolder(userId.Substring(0,4),userId);
string[] saFiles = oUserFolder.GetSubfolderFilesName(Type);
return (saFiles == null)? 0 : saFiles.Length ;
}
The Error :
*********
Both Int32 MessageCount(System.String, System.String, System.String) and
Int32 MessageCount(System.String, System.String) use the message name
'MessageCount'. Use the MessageName property of the WebMethod custom
attribute to specify unique message names for the methods.
Why I'm getting this error? I dont understand from the message what should I
do?
any help please?