icsharpcode / CodeConverter

Convert code from C# to VB.NET and vice versa using Roslyn
https://icsharpcode.github.io/CodeConverter/
MIT License
842 stars 219 forks source link

VB -> C#: Error translating Not (x IsNot Nothing) #1113

Closed mom-bbtsoftware closed 4 months ago

mom-bbtsoftware commented 4 months ago

VB.Net input code

If Not (x IsNot Nothing) Then

' same meaning as: If x Is Nothing Then

Erroneous output

if (x is not null)

Expected output

if (x is null)

Details

mom-bbtsoftware commented 4 months ago

grafik

GrahamTheCoder commented 4 months ago

Yikes. Thanks for the report, I can guess how that happened. Should be an easy fix.