System.Data.DataTable.ToString C# (CSharp) Méthode

ToString() public méthode

Returns the and , if there is one as a concatenated string.
public ToString ( ) : string
Résultat string
        public override string ToString() => _displayExpression == null ?
            TableName :
            TableName + " + " + DisplayExpressionInternal;

Usage Example

Exemple #1
5
 public DataTable selectUser(string Username)
 {
     SqlConnection con = new SqlConnection(constr);
     SqlCommand com = new SqlCommand("select_user");
     SqlDataAdapter adp = new SqlDataAdapter(com);
     DataTable userData = new DataTable();
     com.CommandType = CommandType.StoredProcedure;
     com.Parameters.AddWithValue("@Username", Username);
     com.Connection = con;
     try
     {
         con.Open();
         //System.Diagnostics.Debug.Write("HERE 1");//DEBUG
         adp.Fill(userData);
     }
     catch(Exception ex)
     {
         throw ex;
     }
     finally
     {
         System.Diagnostics.Debug.Write("HERE 2");
         con.Close();
     }
     System.Diagnostics.Debug.Write("HERE 3: "+userData.ToString());
     return userData;
 }
All Usage Examples Of System.Data.DataTable::ToString
DataTable