EmptyTypes Field

Type.EmptyTypes Field


Represents an empty array of type Type. This field is read-only.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

public static readonly Type[] EmptyTypes

Field Value

Type: System.Type[]

The following code example shows the EmptyTypes field used in one of the GetConstructor methods to get a constructor that takes no parameters.

static void GetSchemaInfo(SqlConnection connection)
    using (connection)
        SqlCommand command = new SqlCommand(
          "SELECT CategoryID, CategoryName FROM Categories;",

        SqlDataReader reader = command.ExecuteReader();
        DataTable schemaTable = reader.GetSchemaTable();

        foreach (DataRow row in schemaTable.Rows)
            foreach (DataColumn column in schemaTable.Columns)
                Console.WriteLine(String.Format("{0} = {1}",
                   column.ColumnName, row[column]));

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
© 2015 Microsoft