rspec/rules/S3869/vbnet/rule.adoc

13 lines
346 B
Plaintext
Raw Normal View History

include::../why-dotnet.adoc[]
2020-06-30 12:48:39 +02:00
2022-02-04 17:28:24 +01:00
[source,vbnet]
2020-06-30 12:48:39 +02:00
----
Sub Dangerous(fieldInfo As System.Reflection.FieldInfo)
Dim handle As SafeHandle = CType(fieldInfo.GetValue(fieldInfo), SafeHandle)
Dim dangerousHandle As IntPtr = handle.DangerousGetHandle ' Noncompliant
End Sub
----
include::../resources-dotnet.adoc[]
include::../rspecator-dotnet.adoc[]