| Visual Basic (Declaration) | |
|---|---|
Public Overridable Sub Insert( _ ByVal index As Integer, _ ByVal style As NamedStyle _ ) | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As NamedStyleCollection Dim index As Integer Dim style As NamedStyle instance.Insert(index, style) | |
| C# | |
|---|---|
public virtual void Insert( int index, NamedStyle style ) | |
Parameters
- index
- Zero-based index at which to insert the named style
- style
- Style to insert into the collection
| Exception | Description |
|---|---|
| System.IndexOutOfRangeException | Specified index is out of range; must be between 0 and the total number in the collection |
| System.ArgumentNullException | No style specified or specified style is null |
This method inserts a style (NamedStyle object) into the collection of styles.
This example inserts a style at the specified index into the collection.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family