the Following code is working in VB.net
int UserType
Dim parameterUserType As SqlParameter = New SqlParameter("@UserType", SqlDbType.BigInt, 8)
parameterUserType.Direction = ParameterDirection.Output
ObjCommand.Parameters.Add(parameterUserType)
ObjCommand.ExecuteNonQuery()
UserType = CInt(parameterUserType.Value)
But in C#
int usertype
SqlParameter p4 = new SqlParameter("@usertype", SqlDbType.BigInt, 8);
p4.Direction = ParameterDirection.Output;
cmd.Parameters.Add(p4);
objdb.getConnectOpen();
cmd.ExecuteNonQuery();
usertype = Convert.ToInt32(p4.Value);
I know that Convert.ToInt32 takes BOOl value .. but if i want to place Expression (p4.value) in thiz then Wat should i do? plz help me
Ayesha