Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
GetType()
1 parent d776d9f commit 87bb4a1Copy full SHA for 87bb4a1
1 file changed
csharp/ql/test/library-tests/controlflow/guards/Guards.cs
@@ -262,4 +262,12 @@ void M21(bool b)
262
return;
263
}
264
265
+
266
+ void M22(object o1, object o2)
267
+ {
268
+ if (o1?.GetType() == o2.GetType())
269
+ o1.ToString(); // null guarded
270
+ if (o1?.GetType() == o2?.GetType())
271
+ o1.ToString(); // not null guarded
272
+ }
273
0 commit comments