Spread ASP.NET 6.0 Product Documentation
CopyTo(Array,Int32) Method
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > DefaultStyleCollection Class > CopyTo Method : CopyTo(Array,Int32) Method


array
One-dimensional array into which are copied the elements from ICollection; the array indexing must be zero-based.
index
Zero-based index in the array at which to paste the styles

Glossary Item Box

Copies the styles in the collection to a specified array.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub CopyTo( _
   ByVal array As Array, _
   ByVal index As Integer _
) 
Visual Basic (Usage)Copy Code
Dim instance As DefaultStyleCollection
Dim array As Array
Dim index As Integer
 
instance.CopyTo(array, index)
C# 
public void CopyTo( 
   Array array,
   int index
)

Parameters

array
One-dimensional array into which are copied the elements from ICollection; the array indexing must be zero-based.
index
Zero-based index in the array at which to paste the styles

Exceptions

ExceptionDescription
System.ArgumentNullExceptionNo array specified, or specified array is null (Nothing)
System.ArgumentExceptionSpecified array is invalid; must have a rank of one
System.ArgumentExceptionSpecified array is invalid; must have sufficient length
System.IndexOutOfRangeExceptionSpecified index is out of range; must be greater than zero

Example

C#Copy Code
FarPoint.Web.Spread.DefaultStyleCollection dsc = new FarPoint.Web.Spread.DefaultStyleCollection();
Object[] myarray = new Object[dsc.Count];
dsc.CopyTo(myarray, 0);
TextBox1.Text = myarray.GetValue(1).ToString();
Visual BasicCopy Code
Dim dsc As New FarPoint.Web.Spread.DefaultStyleCollection
Dim myarray(dsc.Count)
dsc.CopyTo(myarray, 0)
TextBox1.Text = myarray.GetValue(1).ToString()

Requirements

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

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.