Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Kopiert die Member der Cookieauflistung beginnend am angegebenen Index in ein Array.
Namespace: System.Web
Assembly: System.Web (in system.web.dll)
Syntax
'Declaration
Public Sub CopyTo ( _
dest As Array, _
index As Integer _
)
'Usage
Dim instance As HttpCookieCollection
Dim dest As Array
Dim index As Integer
instance.CopyTo(dest, index)
public void CopyTo (
Array dest,
int index
)
public:
void CopyTo (
Array^ dest,
int index
)
public void CopyTo (
Array dest,
int index
)
public function CopyTo (
dest : Array,
index : int
)
Parameter
- dest
Das Ziel-Array.
- index
Der Index des Zielarrays, an dem mit dem Kopieren begonnen wird.
Beispiel
Im folgenden Beispiel wird die gesamte Cookieauflistung in ein neues Array-Objekt kopiert.
' Create the one-dimensional target array.
' Dimension it large enough to hold the cookies collection.
Dim MyArray As Array = Array.CreateInstance(GetType(String), Request.Cookies.Count)
' Copy the entire collection to the array.
Request.Cookies.CopyTo(MyArray, 0)
// Create the one-dimensional target array.
// Dimension it large enough to hold the cookies collection.
Array MyArray = Array.CreateInstance( typeof(String), Request.Cookies.Count );
// Copy the entire collection to the array.
Request.Cookies.CopyTo( MyArray, 0 );
// Create the one-dimensional target array.
// Dimension it large enough to hold the cookies collection.
Array myArray = Array.CreateInstance(String.class.ToType(),
get_Request().get_Cookies().get_Count());
// Copy the entire collection to the array.
get_Request().get_Cookies().CopyTo(myArray, 0);
// Create the one-dimensional target Array.
// Dimension it large enough to hold the cookies collection.
var myArray : System.Array = System.Array.CreateInstance(System.String, Request.Cookies.Count)
// Copy the entire cookies collection to the array.
Request.Cookies.CopyTo(myArray, 0)
Plattformen
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
Siehe auch
Referenz
HttpCookieCollection-Klasse
HttpCookieCollection-Member
System.Web-Namespace
Clear
Add