powered by UserVoice

Code Converter Feedback Forum

Log in or Sign up |

Welcome to our official feedback forum for the code converter. If you spot problems with the converter, just leave a note here. **Please make sure you include a code sample***

  1. 22 votes
    Vote

    Full project conversion under review

    Would be awesome to upload a pile of files, having them spit back out in converted form

    For the moment, you're best off going and downloading the #develop IDE and performing the conversion that way. We will look into doing this though!

    - james.crowley
  2. 17 votes
    Vote

    Array brackets

    VB.NET Array parentheses do not translate to C# brackets

    Example (VB.NET):

    Dim pts(2) As Point
    pts(0) = New Point(left + arrowWidth / 2 - 2 -extra - 2, top + height / 2 - 1)
    pts(1) = New Point(left + arrowWidth / 2 + 3 +extra - 1, top + height / 2 - 1)
    pts(2) = New Point(left + arrowWidt... more

  3. 13 votes
    Vote

    ViewState, Session or Request.Params not arrays under review

    In my example below, none of the ViewState, Session or Request Params (arrays) have their round brackets converted to square brackets.

    Example:
    Protected Property CurrentSortColumn() As String
    Get
    If (ViewState("SortColumn") <> Nothing) Then
    ... more

    Unfortunately we have no reliable way of knowing for sure that ViewState is an array rather than a method. We could guess for certain variable names (ViewState, Request etc) but this could confuse the issue further were these to conflict with actual methods... what do people think?

    - james.crowley
  4. 13 votes
    Vote

    fix Linq conversion bugs started

    var orig = myDSet.Tables[0].AsEnumerable();

    translates to the following incorrect code

    Dim orig As var = myDSet.Tables(0).AsEnumerable()

    it should translate to

    Dim orig = myDSet.Tables(0).AsEnumerable()

    var newRec = from u in dsChanged
    where !(from o in orig
    select o.Field&... more

    This has been partially fixed (the var reference now resolves correctly)

    We're still working on the LINQ-related issues.

    - james.crowley
  5. 9 votes
    Vote

    string.empty

    In VB the syntax is -

    If inputValue.Trim = String.Empty Then...

    When converting to C# it is not adding the "()" to the end of "string.Empty".

  6. 9 votes
    Vote
  7. 8 votes
    Vote

    Delegates

    If button.InvokeRequired Then
    Dim o As Object = scriptableButton.Invoke(New System.Windows.Forms.MethodInvoker(UserInterfaceCode))
    End If

    Should be

    If button.InvokeRequired Then
    Dim o As Object = scriptableButton.Inv... more

  8. 8 votes
    Vote

    Object initializers not converting under review

    Hi there, trying to convert this line from c#
    Person p = new Person { FirstName = "Joe", LastName="Doe" };

    the converter ignores the object initializer, a new C# 3.5 feature, and just converts it into
    Dim p as new Person()

    Thanks.

  9. 7 votes
    Vote

    Implement conversion for yield statement into VB.NET

    Using an IEnumerable collection and returning that instead

  10. 6 votes
    Vote

    trim under review

    The syntax in VB is

    returnValue = inputValue.Trim

    When converting to C# it is not adding the "()" to the end of "Trim"

  11. 5 votes
    Vote

    optional method parameters not converted from VB to C#

    Methods with Optional Parameters,
    Private Sub ThisMethod(Optional byRef strVal as String = "me")

    Are not converted . creating overloaded methods might be a way to go, just add into the base method the additional variables assigned with default values.
    see below example.
    //metho... more

  12. 5 votes
    Vote

    Dim endPoint As New Point(If(orientation = Orientation.Horiz

    Doesn't handle shorthand properly?

  13. 5 votes
    Vote

    Suggest code to make event handlers work (VB.Net -> C#)

    The converter could suggest the code needed to bind an event handler.

    Example:

    Private Sub SomeObject_SomeEvent(Arguments as Object) Handles SomeObject.SomeEvent

    The following code could be suggested (in a comment):
    SomeObject.SomeEvent += SomeObject_SomeEvent;

  14. 4 votes
    Vote

    This Linq statement doesn't translate from VB to C#

    Dim Table1() As String = {"One", "Two", "Three"}
    Dim Table2() As String = {"One", "Three", "Four"}

    Dim Results = From Value In Table1 Where Not Table2.Contains(Value)

    The resulting C# for the Linq is just
    var Res... more

  15. 4 votes
    Vote

    remove event handler under review

    I've encountered a problem removing an event handler converting c# to VB (2008)

    c# code:

    void displayElement_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
    {
    VerifyEditVisualization(sender);
    }

    void displayElement_GotFocus(obje... more

  16. 4 votes
    Vote

    Redim: ToDo comment & keep original code

    Is it possible to add a "ToDo" comment and the original Basic Redim code? This will definately make manual conversion of ReDim statements easier.

  17. 4 votes
    Vote

    Inline if from C# to VB.NET missing an i

    Convert this c# line:
    return (param==values[i-2]) ? values[i-1] : 0;

    results in:
    if(param=values(i-2), values(i-1), 0)

    missing additional 'i' for 'iif'

  18. 4 votes
    Vote

    in-line c# comment are put one line below

    string foo; //this is inline

    should become:

    Dim foo As String 'this is inline

    instead of:

    Dim foo As String
    'this is inline

  19. 3 votes
    Vote

    Cannot convert code with PInvoke declarations

    The following code gives "Object or reference not set to instance" error on your site. It is a pretty basic piece of code, using only a couple of features like Attritbutes, PInvoke declarations, etc

    private IntPtr FW(IntPtr x, string y) { return FindWindowEx(x, IntPtr.Zero, y, "&q... more

  20. 3 votes
    Vote

    PointerReferenceExpression

    HmIDCollection* IdahoDomainEngineAdapterImpl::GetFireFlowSelectionSetIDs()
    {
    // TODO 1: <whar> Pre-size HmIDCollection.
    HmIDCollection* fireFlowSelectionSetIDs = new HmIDCollection();
    Int32 fireFlowSelectionSetID = GetFireFlowSelectionSetID();
    if (fireFlowSelectionSetID == 0) /... more

powered by UserVoice