2023-06-06 16:41:57 +02:00
|
|
|
include::../why-dotnet.adoc[]
|
2023-05-25 14:18:12 +02:00
|
|
|
|
|
|
|
[source,csharp]
|
|
|
|
----
|
|
|
|
static void Main(string[] args)
|
|
|
|
{
|
|
|
|
System.Reflection.FieldInfo fieldInfo = ...;
|
|
|
|
SafeHandle handle = (SafeHandle)fieldInfo.GetValue(rKey);
|
2023-06-06 16:41:57 +02:00
|
|
|
IntPtr dangerousHandle = handle.DangerousGetHandle(); // Noncompliant
|
2023-05-25 14:18:12 +02:00
|
|
|
}
|
|
|
|
----
|
|
|
|
|
2023-06-06 16:41:57 +02:00
|
|
|
include::../resources-dotnet.adoc[]
|
2021-09-20 15:38:42 +02:00
|
|
|
|
2023-06-06 16:41:57 +02:00
|
|
|
include::../rspecator-dotnet.adoc[]
|