日期:2014-05-20  浏览次数:20673 次

关于类型转换的问题,请大家帮忙,谢谢了~
"select   ID,FatherVocationName   from   FatherVocation   where   Id= "+this.ds.table[0].rows[1][2].tostring()

Id是int类型的,怎么把this.ds.table[0].rows[1][2].tostring()转换成int类型的呢,急,请各位大侠帮忙;



------解决方案--------------------
(int)this.ds.table[0].rows[1][2]
------解决方案--------------------
Convert.Toint32()
------解决方案--------------------
Convert.Toint32(this.ds.table[0].rows[1][2])
------解决方案--------------------
Convert.ToInt32(this.ds.Table[0].Rows[1][2])