GCHandleExtensions.GetAddressOfStringData Metod

Definition

Viktigt!

Detta API uppfyller inte CLS.

Hämtar adressen till strängdata i handle.

public:
[System::Runtime::CompilerServices::Extension]
 static char* GetAddressOfStringData(System::Runtime::InteropServices::PinnedGCHandle<System::String ^> handle);
[System.CLSCompliant(false)]
public static char* GetAddressOfStringData(this System.Runtime.InteropServices.PinnedGCHandle<string> handle);
[<System.CLSCompliant(false)>]
static member GetAddressOfStringData : System.Runtime.InteropServices.PinnedGCHandle<string> -> nativeptr<char>

Parametrar

handle
PinnedGCHandle<String>

Handtaget som pekaren ska hämtas från.

Returer

Char*

Adressen till det 0:e tecknet för det fästa String, eller null om handtaget inte pekar på något objekt.

Attribut

Undantag

Handtaget har inte initierats eller har redan tagits bort.

Gäller för