Exemple #1
0
 static public IntPtr AsIntPtr <T>(this BasePointer <T> inst)
     where T : struct
 {
     return(inst?.Ptr ?? IntPtr.Zero);
 }
Exemple #2
0
 static public IntPtr EnsureIntPtr <T>(this BasePointer <T> inst, string argname)
     where T : struct
 {
     return(inst?.Ptr ?? throw new ArgumentNullException(argname));
 }