I'm creating a DataProvider, I begin to have something working and was about
to implement IDbParameter. Now I discover that there is a C# subtelty I
don't master:
I wrote
public class FileMakerComman d : IDbCommand
{
.......
public FileMakerDataPa rameter Parameters
{
get { /* return something */ }
}
....
}
however this is incorrect because IDbCommand require Parameters to return an
IDataParameterC ollection
then I wrote (half remembering something I read a while ago):
public class FileMakerComman d : IDbCommand
{
.......
FileMakerDataPa rameter IDbCommand.Para meters
{
get { /* return something */ }
}
public FileMakerDataPa rameter Parameters
{
get { /* return something */ }
}
....
}
and it worked.
now I wonder, when this package accessor (the IDbCommand.Para meters one) get
called ? when you cast the instance as just a IDbCommand ? never ? always ?
sometimes in the afternoon ?
could anyone shed some light ?
thanks :-)
to implement IDbParameter. Now I discover that there is a C# subtelty I
don't master:
I wrote
public class FileMakerComman d : IDbCommand
{
.......
public FileMakerDataPa rameter Parameters
{
get { /* return something */ }
}
....
}
however this is incorrect because IDbCommand require Parameters to return an
IDataParameterC ollection
then I wrote (half remembering something I read a while ago):
public class FileMakerComman d : IDbCommand
{
.......
FileMakerDataPa rameter IDbCommand.Para meters
{
get { /* return something */ }
}
public FileMakerDataPa rameter Parameters
{
get { /* return something */ }
}
....
}
and it worked.
now I wonder, when this package accessor (the IDbCommand.Para meters one) get
called ? when you cast the instance as just a IDbCommand ? never ? always ?
sometimes in the afternoon ?
could anyone shed some light ?
thanks :-)
Comment