# System.Data ``` diff namespace System.Data { public abstract class Constraint { - protected Constraint(); } + public static class DataReaderExtensions { + public static bool GetBoolean(this DbDataReader reader, string name); + public static byte GetByte(this DbDataReader reader, string name); + public static long GetBytes(this DbDataReader reader, string name, long dataOffset, byte[] buffer, int bufferOffset, int length); + public static char GetChar(this DbDataReader reader, string name); + public static long GetChars(this DbDataReader reader, string name, long dataOffset, char[] buffer, int bufferOffset, int length); + public static DbDataReader GetData(this DbDataReader reader, string name); + public static string GetDataTypeName(this DbDataReader reader, string name); + public static DateTime GetDateTime(this DbDataReader reader, string name); + public static decimal GetDecimal(this DbDataReader reader, string name); + public static double GetDouble(this DbDataReader reader, string name); + public static Type GetFieldType(this DbDataReader reader, string name); + public static T GetFieldValue(this DbDataReader reader, string name); + public static Task GetFieldValueAsync(this DbDataReader reader, string name, CancellationToken cancellationToken = default(CancellationToken)); + public static float GetFloat(this DbDataReader reader, string name); + public static Guid GetGuid(this DbDataReader reader, string name); + public static short GetInt16(this DbDataReader reader, string name); + public static int GetInt32(this DbDataReader reader, string name); + public static long GetInt64(this DbDataReader reader, string name); + public static Type GetProviderSpecificFieldType(this DbDataReader reader, string name); + public static object GetProviderSpecificValue(this DbDataReader reader, string name); + public static Stream GetStream(this DbDataReader reader, string name); + public static string GetString(this DbDataReader reader, string name); + public static TextReader GetTextReader(this DbDataReader reader, string name); + public static object GetValue(this DbDataReader reader, string name); + public static bool IsDBNull(this DbDataReader reader, string name); + public static Task IsDBNullAsync(this DbDataReader reader, string name, CancellationToken cancellationToken = default(CancellationToken)); + } + public static class DataRowComparer { + public static DataRowComparer Default { get; } + } + public sealed class DataRowComparer : IEqualityComparer where TRow : DataRow { + public static DataRowComparer Default { get; } + public bool Equals(TRow leftRow, TRow rightRow); + public int GetHashCode(TRow row); + } + public static class DataRowExtensions { + public static T Field(this DataRow row, DataColumn column); + public static T Field(this DataRow row, DataColumn column, DataRowVersion version); + public static T Field(this DataRow row, int columnIndex); + public static T Field(this DataRow row, int columnIndex, DataRowVersion version); + public static T Field(this DataRow row, string columnName); + public static T Field(this DataRow row, string columnName, DataRowVersion version); + public static void SetField(this DataRow row, DataColumn column, T value); + public static void SetField(this DataRow row, int columnIndex, T value); + public static void SetField(this DataRow row, string columnName, T value); + } + public static class DataTableExtensions { + public static DataView AsDataView(this DataTable table); + public static DataView AsDataView(this EnumerableRowCollection source) where T : DataRow; + public static EnumerableRowCollection AsEnumerable(this DataTable source); + public static DataTable CopyToDataTable(this IEnumerable source) where T : DataRow; + public static void CopyToDataTable(this IEnumerable source, DataTable table, LoadOption options) where T : DataRow; + public static void CopyToDataTable(this IEnumerable source, DataTable table, LoadOption options, FillErrorEventHandler errorHandler) where T : DataRow; + } + public abstract class EnumerableRowCollection : IEnumerable { + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public class EnumerableRowCollection : EnumerableRowCollection, IEnumerable, IEnumerable { + public IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public static class EnumerableRowCollectionExtensions { + public static EnumerableRowCollection Cast(this EnumerableRowCollection source); + public static OrderedEnumerableRowCollection OrderBy(this EnumerableRowCollection source, Func keySelector); + public static OrderedEnumerableRowCollection OrderBy(this EnumerableRowCollection source, Func keySelector, IComparer comparer); + public static OrderedEnumerableRowCollection OrderByDescending(this EnumerableRowCollection source, Func keySelector); + public static OrderedEnumerableRowCollection OrderByDescending(this EnumerableRowCollection source, Func keySelector, IComparer comparer); + public static EnumerableRowCollection Select(this EnumerableRowCollection source, Func selector); + public static OrderedEnumerableRowCollection ThenBy(this OrderedEnumerableRowCollection source, Func keySelector); + public static OrderedEnumerableRowCollection ThenBy(this OrderedEnumerableRowCollection source, Func keySelector, IComparer comparer); + public static OrderedEnumerableRowCollection ThenByDescending(this OrderedEnumerableRowCollection source, Func keySelector); + public static OrderedEnumerableRowCollection ThenByDescending(this OrderedEnumerableRowCollection source, Func keySelector, IComparer comparer); + public static EnumerableRowCollection Where(this EnumerableRowCollection source, Func predicate); + } + public sealed class OrderedEnumerableRowCollection : EnumerableRowCollection + public abstract class TypedTableBase : DataTable, IEnumerable, IEnumerable where T : DataRow { + protected TypedTableBase(); + protected TypedTableBase(SerializationInfo info, StreamingContext context); + public EnumerableRowCollection Cast(); + public IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public static class TypedTableBaseExtensions { + public static EnumerableRowCollection AsEnumerable(this TypedTableBase source) where TRow : DataRow; + public static TRow ElementAtOrDefault(this TypedTableBase source, int index) where TRow : DataRow; + public static OrderedEnumerableRowCollection OrderBy(this TypedTableBase source, Func keySelector) where TRow : DataRow; + public static OrderedEnumerableRowCollection OrderBy(this TypedTableBase source, Func keySelector, IComparer comparer) where TRow : DataRow; + public static OrderedEnumerableRowCollection OrderByDescending(this TypedTableBase source, Func keySelector) where TRow : DataRow; + public static OrderedEnumerableRowCollection OrderByDescending(this TypedTableBase source, Func keySelector, IComparer comparer) where TRow : DataRow; + public static EnumerableRowCollection Select(this TypedTableBase source, Func selector) where TRow : DataRow; + public static EnumerableRowCollection Where(this TypedTableBase source, Func predicate) where TRow : DataRow; + } } ```