aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/Grpc.Core/Internal/AuthContextSafeHandle.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/csharp/Grpc.Core/Internal/AuthContextSafeHandle.cs')
-rw-r--r--src/csharp/Grpc.Core/Internal/AuthContextSafeHandle.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/csharp/Grpc.Core/Internal/AuthContextSafeHandle.cs b/src/csharp/Grpc.Core/Internal/AuthContextSafeHandle.cs
index 6c22bd59ba..f7a6b320a7 100644
--- a/src/csharp/Grpc.Core/Internal/AuthContextSafeHandle.cs
+++ b/src/csharp/Grpc.Core/Internal/AuthContextSafeHandle.cs
@@ -74,7 +74,7 @@ namespace Grpc.Core.Internal
private AuthProperty PtrToAuthProperty(IntPtr authPropertyPtr)
{
- var nativeAuthProperty = (NativeAuthProperty) Marshal.PtrToStructure(authPropertyPtr, typeof(NativeAuthProperty));
+ var nativeAuthProperty = Marshal.PtrToStructure<NativeAuthProperty>(authPropertyPtr);
var name = Marshal.PtrToStringAnsi(nativeAuthProperty.Name);
var valueBytes = new byte[(int) nativeAuthProperty.ValueLength];
Marshal.Copy(nativeAuthProperty.Value, valueBytes, 0, (int)nativeAuthProperty.ValueLength);