System.Data.SqlClient.SqlDataReader.SqlDataReader.ConstructSchemaTable C# (CSharp) Method

ConstructSchemaTable() private static method

private static ConstructSchemaTable ( ) : DataTable
return System.Data.DataTable
		private static DataTable ConstructSchemaTable ()
		{
			Type booleanType = typeof (bool);
			Type stringType = typeof (string);
			Type intType = typeof (int);
#if NET_2_0
			Type typeType = typeof (Type);
#endif
			Type shortType = typeof (short);

			DataTable schemaTable = new DataTable ("SchemaTable");
			schemaTable.Columns.Add ("ColumnName", stringType);
			schemaTable.Columns.Add ("ColumnOrdinal", intType);
			schemaTable.Columns.Add ("ColumnSize", intType);
			schemaTable.Columns.Add ("NumericPrecision", shortType);
			schemaTable.Columns.Add ("NumericScale", shortType);
			schemaTable.Columns.Add ("IsUnique", booleanType);
			schemaTable.Columns.Add ("IsKey", booleanType);
			schemaTable.Columns.Add ("BaseServerName", stringType);
			schemaTable.Columns.Add ("BaseCatalogName", stringType);
			schemaTable.Columns.Add ("BaseColumnName", stringType);
			schemaTable.Columns.Add ("BaseSchemaName", stringType);
			schemaTable.Columns.Add ("BaseTableName", stringType);
#if NET_2_0
			schemaTable.Columns.Add ("DataType", typeType);
#else
			schemaTable.Columns.Add ("DataType", typeof (object));
#endif
			schemaTable.Columns.Add ("AllowDBNull", booleanType);
			schemaTable.Columns.Add ("ProviderType", intType);
			schemaTable.Columns.Add ("IsAliased", booleanType);
			schemaTable.Columns.Add ("IsExpression", booleanType);
			schemaTable.Columns.Add ("IsIdentity", booleanType);
			schemaTable.Columns.Add ("IsAutoIncrement", booleanType);
			schemaTable.Columns.Add ("IsRowVersion", booleanType);
			schemaTable.Columns.Add ("IsHidden", booleanType);
			schemaTable.Columns.Add ("IsLong", booleanType);
			schemaTable.Columns.Add ("IsReadOnly", booleanType);
#if NET_2_0
			schemaTable.Columns.Add ("ProviderSpecificDataType", typeType);
			schemaTable.Columns.Add ("DataTypeName", stringType);
			schemaTable.Columns.Add ("XmlSchemaCollectionDatabase", stringType);
			schemaTable.Columns.Add ("XmlSchemaCollectionOwningSchema", stringType);
			schemaTable.Columns.Add ("XmlSchemaCollectionName", stringType);
			schemaTable.Columns.Add ("UdtAssemblyQualifiedName", stringType);
			schemaTable.Columns.Add ("NonVersionedProviderType", intType);
			schemaTable.Columns.Add ("IsColumnSet", booleanType);
#endif
			
			return schemaTable;
		}