Conversion of C# code to Delphi code (if condition) : <p>I'm converting a C# project to Delphi and am struggling with this C# code:</p>

<pre><code>if (!String.IsNullOrEmpty(myItem.mySubItem?.Content) &amp;&amp; (myItem.Quantity == 0) &amp;&amp; (String.IsNullOrEmpty(myItem.Description)))
{
  continue;
}
</code></pre>

<p>From my understanding the Delphi code should look like this:</p>

<pre><code>if assigned(myItem.mySubItem) and (length(trim(myItem.mySubItem.Content)) &gt; 0) and (myItem.Quantity = 0) and (length(trim(myItem.Description)) = 0) then begin
    Continue;
end;
</code></pre>

<p>But I'm not 100% sure, because logically it doesn't make sense. That's another story though. My question is: is my Delphi code a correct conversion of the quoted C# code?</p>

<p>In case it's wrong, what would be the correct code?</p>
