System.Data.SqlClient.SqlDataReader.SqlDataReader.GetValue C# (CSharp) Méthode

GetValue() public méthode

public GetValue ( int i ) : object
i int
Résultat object
		object GetValue (int i)
		{
			ValidateState ();
			EnsureDataAvailable ();

			if (i < 0 || i >= command.Tds.Columns.Count)
				throw new IndexOutOfRangeException ();

			try {
				if ((command.CommandBehavior & CommandBehavior.SequentialAccess) != 0) {
					return ((Tds)command.Tds).GetSequentialColumnValue (i);
				}
			} catch (TdsInternalException ex) {
				command.Connection.Close ();
				throw SqlException.FromTdsInternalException ((TdsInternalException) ex);
			}

			return command.Tds.ColumnValues [i];
		}