-
Notifications
You must be signed in to change notification settings - Fork 233
Closed
Labels
VB -> C#Specific to VB -> C# conversionSpecific to VB -> C# conversioncompilation errorA bug where the converted output won't compileA bug where the converted output won't compile
Description
Input code
txtTotal.Text = Math.Round(sqlDT.Rows(0)("Expr1"), 2)Erroneous output
txtTotal.Text = Conversions.ToString(Math.Round(sqlDT.Rows[0]["Expr1"], (object)2));
the stack trace.
Error CS1503 Argument 1: cannot convert from 'object' to 'double'Expected output
txtTotal.Text = Conversions.ToString(Math.Round(double.Parse(sqlDT.Rows[0]["Expr1"].ToString()), 2));
In C#, Math.Round function expecting 'double' datatype.Details
- Product in use: e.g. codeconverter.icsharpcode.net / VS extension / both
- Version in use: e.g. 5.6.3 or a commit hash (if it's a 3rd party tool using this library, try one of the above)
- Did you see it working in a previous version, which?
- Any other relevant information to the issue, or your interest in contributing a fix.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
VB -> C#Specific to VB -> C# conversionSpecific to VB -> C# conversioncompilation errorA bug where the converted output won't compileA bug where the converted output won't compile