如何使用C#将数据行值存储到变量中 [英] how to store the datarow values into the variables using C#
本文介绍了如何使用C#将数据行值存储到变量中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用c#
将数据行值存储到变量中
我的代码如下;
How to store the datarow values into the variables using c#
My code as follows;
DataRow objRow;
objRow = objDt.NewRow();
objRow[0] = sCourse;
objRow[1] = sRate;
objRow[2] = ViewState["batchid"].ToString();
if (ViewState["temp"] == "P")
{
objRow[3] = ViewState["PackageID"];
}
else
{
objRow[3] = "";
objRow[4] = Convert.ToDateTime(ViewState["StDt"].ToString());
objRow[5] = Convert.ToDateTime(ViewState["EdDt"].ToString());
}
从我的上面的代码中如何将objRow [4]和objRow [5]值存储到变量中。
请帮帮我。我怎么能用csharp。
问候,
Narasiman P.
From my above code how to store the objRow[4] and objRow[5] values into the variables.
Please help me. how can i do using csharp.
Regards,
Narasiman P.
推荐答案
我想你会在这里找到很多例子:
Google [ ^ ]
所以问题很快就解决了; - )
I think you''ll find lots of examples here:
Google[^]
So problems soon solved ;-)
这篇关于如何使用C#将数据行值存储到变量中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文