Overriding methods on an interface

B

byoukstetter

So, I have an interface with several overriding methods:

using System;
using System.Collections.Specialized;

namespace some.name.space
{
public interface IVrsPersistenceProvider
{
string[] Select(string idName, string tableName, string whereClause);
string[] Select(string idName, string tableName, NameValueCollection
whereClause);
NameValueCollection Select(string[] selectColumns, string tableName,
long id, string idName);
NameValueCollection Select(string[] selectColumns, string tableName,
string id, string idName);
void Update(string tableName, NameValueCollection updateCollection,
long id, string idName);
void Update(string tableName, NameValueCollection updateCollection,
string id, string idName);
string Insert(string tableName, NameValueCollection
insertCollection);
void Delete(long id, string idName, string tableName);
void Delete(string id, string idName, string tableName);
}
}

This interface is referenced by another project (lets call it project
A) that uses a factory to obtain a handler to an instance of the above
interface.

I can compile the proj that contains the interface. I can compile the
project that contains implementors of the interface. However, when I
attempt to compile "project A" the compiler complains with the
following errors:

The best overloaded method match for
'some.name.space.IVrsPersistenceProvider.Delete(long, string, string)'
has some invalid arguments

The best overloaded method match for
'some.name.space.IVrsPersistenceProvider.Select(string[], string, long,
string)' has some invalid arguments

The best overloaded method match for
'some.name.space.IVrsPersistenceProvider.Update(string,
System.Collections.Specialized.NameValueCollection, long, string)' has
some invalid arguments

If I change the method name it works...no mystry there. If I add an
extra arguement it works. What am I doing wrong?
 
J

Joanna Carter \(TeamB\)

I can compile the proj that contains the interface. I can compile the
project that contains implementors of the interface. However, when I
attempt to compile "project A" the compiler complains with the
following errors:

The best overloaded method match for
'some.name.space.IVrsPersistenceProvider.Delete(long, string, string)'
has some invalid arguments

The best overloaded method match for
'some.name.space.IVrsPersistenceProvider.Select(string[], string, long,
string)' has some invalid arguments

The best overloaded method match for
'some.name.space.IVrsPersistenceProvider.Update(string,
System.Collections.Specialized.NameValueCollection, long, string)' has
some invalid arguments

AFAIK, this is caused by the calling code being incorrect, you don't appear
to show us that.

Joanna
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top