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***
-
22 votes
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 -
17 votes
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 -
13 votes
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
... moreUnfortunately 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 -
13 votes
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&... moreThis has been partially fixed (the var reference now resolves correctly)
We're still working on the LINQ-related issues.
- james.crowley -
9 votes
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".
-
8 votes
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.
-
7 votes
Implement conversion for yield statement into VB.NET
Using an IEnumerable collection and returning that instead
-
5 votes
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 -
5 votes
Dim endPoint As New Point(If(orientation = Orientation.Horiz
Doesn't handle shorthand properly?
-
5 votes
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; -
4 votes
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 -
4 votes
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
-
4 votes
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.
-
4 votes
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'
-
4 votes
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 -
3 votes
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
-
3 votes
PointerReferenceExpression
HmIDCollection* IdahoDomainEngineAdapterImpl::GetFireFlowSelectionSetIDs()
{
// TODO 1: <whar> Pre-size HmIDCollection.
HmIDCollection* fireFlowSelectionSetIDs = new HmIDCollection();
Int32 fireFlowSelectionSetID = GetFireFlowSelectionSetID();
if (fireFlowSelectionSetID == 0) /... more
