Index::Script Method ()
Generates a Transact-SQL script that can be used to re-create the index.
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
The generated script might contain undocumented, internal procedures, which are required for the complete script output.
Indexes based partly on the UserDefinedTableType object do not support this method and running this method will generate an exception.