static SqlConnection cn = null;
static DataSet rs1 = null;
static SqlCommand cmd = null;
internal static void Example()
cmd.CommandText = "Select * from Customers where CustomerID = 42";
cmd.CommandType = CommandType.Text;
SqlDataAdapter adap = new SqlDataAdapter(cmd.CommandText, cmd.Connection);
rs1 = new DataSet("dsl");
if (rs1.Tables[0].Rows.Count != 0)
//UPGRADE_WARNING: (2077) Change the default 0 index in the Rows property with the correct one.
if (Convert.ToString(rs1.Tables[0].Rows[0]["Name"]) != "")
//UPGRADE_WARNING: (2077) Change the default 0 index in the Rows property with the correct one.
Debug.WriteLine(Convert.ToString(rs1.Tables[0].Rows[0]["Name"]));
//UPGRADE_WARNING: (2077) Change the default 0 index in the Rows property with the correct one.
if (Convert.ToString(rs1.Tables[0].Rows[0]["Email"]) != "")
//UPGRADE_WARNING: (2077) Change the default 0 index in the Rows property with the correct one.
Debug.WriteLine(Convert.ToString(rs1.Tables[0].Rows[0]["Email"]));