-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VB -> C#: Add null if we have only space in function parameter #445
Comments
Ah, haven't seen that before, thanks for the bug report! |
@GrahamTheCoder This is not fixed.
Error:
|
Please: correct example |
Input Public Class CompilingClass
Dim strArtikelNummer As String
Dim strMengenEinheit As String
Dim strKommentar As String
Function mySuperFunction(ArtikelNummer As String, MengenEinheit As String, Optional ist_die_Nummer_bereitsVorhanden As Boolean = False, Optional Kommentar As String = "")
mySuperFunction = ""
End Function
Function someMainFunction()
Call mySuperFunction(strArtikelNummer, strMengenEinheit, , strKommentar)
someMainFunction = ""
End Function
End Class Actual output public partial class CompilingClass
{
private string strArtikelNummer;
private string strMengenEinheit;
private string strKommentar;
public object mySuperFunction(string ArtikelNummer, string MengenEinheit, bool ist_die_Nummer_bereitsVorhanden = false, string Kommentar = "")
{
object mySuperFunctionRet = default;
mySuperFunctionRet = "";
return mySuperFunctionRet;
}
public object someMainFunction()
{
object someMainFunctionRet = default;
mySuperFunction(strArtikelNummer, strMengenEinheit, Kommentar: strKommentar);
someMainFunctionRet = "";
return someMainFunctionRet;
}
} |
Ok, but why it must be in class? Sometimes I need a quick convert some code. Why it can not be just simple like it is now with:
While I trying this same with this input, it has error:
|
I think I see what you're getting at. There are a few different areas involved here.
|
Ok, thank you |
Retested: OK 👍 Better default (should be null) than exception ;) |
Your example posted above was a good example of why |
Ah, ok ;) |
Input code
Erroneous output
Expected output
Details
The text was updated successfully, but these errors were encountered: