I am trying to find out if particular array element contains InputOutput
value.
private static int FillParameters( DbCommand command, SqlParameter[] p)
{
int x = 0; //int initalize to hold zero
for (int i = 0; i < p.Length; i++)
{
command.Paramet ers.Add(p[i]);
if (p[i].Direction = ParameterDirect ion.InputOutput ) <<<==
error here
x = i;
}
}
but I am getting errors as follows:
Error 39 Cannot implicitly convert type 'System.Data.Pa rameterDirectio n' to
'bool' C:\IList_WareHo use_Solution\Da taObjects\Db.cs 277 22 DataObjects
all I want to know is if p[i].Direction contains the value InputOutput but I
guess am comparing it wrong. Any suggestions?
nick
value.
private static int FillParameters( DbCommand command, SqlParameter[] p)
{
int x = 0; //int initalize to hold zero
for (int i = 0; i < p.Length; i++)
{
command.Paramet ers.Add(p[i]);
if (p[i].Direction = ParameterDirect ion.InputOutput ) <<<==
error here
x = i;
}
}
but I am getting errors as follows:
Error 39 Cannot implicitly convert type 'System.Data.Pa rameterDirectio n' to
'bool' C:\IList_WareHo use_Solution\Da taObjects\Db.cs 277 22 DataObjects
all I want to know is if p[i].Direction contains the value InputOutput but I
guess am comparing it wrong. Any suggestions?
nick
Comment