您的位置:首页 > 编程语言

微软的代码越来越高深莫测了

2013-02-17 13:32 197 查看
//微软的代码越来越高深莫测了
private static int IndexOf(IEnumerable items, string parameterName)
{
if (items != null)
{
int num = 0;
foreach (SqlParameter parameter2 in items)
{
if (ADP.SrcCompare(parameterName, parameter2.ParameterName) == 0)
{
return num;
}
num++;
}
num = 0;
foreach (SqlParameter parameter in items)
{
if (ADP.DstCompare(parameterName, parameter.ParameterName) == 0)
{
return num;
}
num++;
}
}
return -1;
}

protected override DbParameter GetParameter(string parameterName)
{
int index = this.IndexOf(parameterName);
if (index < 0)
{
throw ADP.ParametersSourceIndex(parameterName, this, ItemType);
}
return this.InnerList[index];
}

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: