rspec/rules/S3869/vbnet/rule.adoc

13 lines
346 B
Plaintext

include::../why-dotnet.adoc[]
[source,vbnet]
----
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[]