Closed Saibamen closed 2 weeks ago
If you ctrl click on Emptyin the vb net example within visual studio, what does it resolve to there? Is it string.Empty and is there a corresponding import?
I'm using VB6 SP6
If you upgrade to vb.net first, does it work from the upgraded result? If so, the project likely defines a global import for string. Without knowing that (I. E if you just paste the contents of the file into the Web converter), the converter can't guess which type is referred to.
Visual Basic 2008 Express Edition upgraded the code to this:
Option Strict Off
Option Explicit On
Module SubMainModule
Public Sub Main()
Dim Sprossenart As String
Dim Hoehe As String
Select Case Sprossenart
Case CStr(Nothing), "ohne"
Hoehe = CStr(0)
End Select
End Sub
End Module
ping @GrahamTheCoder
I ran the code you just gave through the we converter. It compiles and runs the same: https://sharplab.io/#v2:C4LgTgrgdgNAJiA1AHwLACgCWVgFMxQCGANgAQACAjAGykAOhYwmJFATKQMoQBGAsoWx8A9nAjFcGAN4YMpeezZyFM9AvWkAboy50wwgM4HcRJqQC8pOLgBmhccAAUVAAwBKANzKNFSi9IAEsK4ABa4XujeGgYA7pjAAMYhpI6ceobGpsCkAPw5pABEBW5R6qo+PgmExlo65ORVNTFhUBQN1bgWlkUgpRWNnQXCIVC4Bb1qFVPlU7PyQaGdli4AdAAqwpzAYNgA5o6efXPqPGC4hADWEccaAL5HpPeT8k+3QA===
Is there an issue here I can't see?
If this works for VB.NET -> C#, this is ok
VB.Net input code
Erroneous output
Expected output
Details