无法将类型为"System.Double"的对象强制转换为类型"System.String" 20
//遍历所有的要素while(pNextRow!=null){pNextRowBuffer=pNextRow;//找出Row为“STATES_NAME”的值,即不同的州名...
//遍历所有的要素
while (pNextRow != null)
{
pNextRowBuffer = pNextRow;
//找出Row为“STATES_NAME”的值,即不同的州名
codeValue = (string)pNextRowBuffer.get_Value(lfieldNumber);
//获取随机颜色带中的任意一个颜色
pNextUniqueColor = pEnumRamp.Next();
if (pNextUniqueColor == null)
{
pEnumRamp.Reset();
pNextUniqueColor = pEnumRamp.Next();
}
pFillSymbol = new SimpleFillSymbolClass();
pFillSymbol.Color = pNextUniqueColor;
//将每次都得的要素字段值和修饰它的符号值放入着色对象中
pUniqueValueR.AddValue(codeValue, strNameField, (ISymbol)
pFillSymbol);
pNextRow = pCursor.NextRow();
}
m_pGeoFeatureL.Renderer = (IFeatureRenderer)pUniqueValueR;
axMapControl1.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, null);
}
codeValue = (string)pNextRowBuffer.get_Value(lfieldNumber); 这句有问题
无法将类型为"System.Double"的对象强制转换为类型"System.String" 展开
while (pNextRow != null)
{
pNextRowBuffer = pNextRow;
//找出Row为“STATES_NAME”的值,即不同的州名
codeValue = (string)pNextRowBuffer.get_Value(lfieldNumber);
//获取随机颜色带中的任意一个颜色
pNextUniqueColor = pEnumRamp.Next();
if (pNextUniqueColor == null)
{
pEnumRamp.Reset();
pNextUniqueColor = pEnumRamp.Next();
}
pFillSymbol = new SimpleFillSymbolClass();
pFillSymbol.Color = pNextUniqueColor;
//将每次都得的要素字段值和修饰它的符号值放入着色对象中
pUniqueValueR.AddValue(codeValue, strNameField, (ISymbol)
pFillSymbol);
pNextRow = pCursor.NextRow();
}
m_pGeoFeatureL.Renderer = (IFeatureRenderer)pUniqueValueR;
axMapControl1.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, null);
}
codeValue = (string)pNextRowBuffer.get_Value(lfieldNumber); 这句有问题
无法将类型为"System.Double"的对象强制转换为类型"System.String" 展开
2个回答
展开全部
建议试下
rmoutbackinfo.StockPrice = selectpriceread[0].ToString();
rmoutbackinfo.RetailPrice = selectpriceread[1].ToString();
rmoutbackinfo.StockPrice = selectpriceread[0].ToString();
rmoutbackinfo.RetailPrice = selectpriceread[1].ToString();
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询