David Perish

c# using statement with initializer won't convert, but VB to C# will work

This code will convert from VB to C#, but not vise-versa:

// C#
using (Obj x = new Obj {a == 1,b == 2}) {
Console.WriteLine(x);
}

' VB.Net
Using x As New Obj With { a = 1, b = 2}
Console.WriteLine(x)
End Using
Problem by David Perish Status: Not Done Comments: 0 Last update: 2014-12-19T15:31:03 by David Perish
0
JumpMan Jones

Desk

Add web-service so that conversion of code can be done without having to hit the website. It would be cool to have a plugin within visual studio that also converted code .
Idea by JumpMan Jones Status: Not Done Comments: 0 Last update: 2014-12-16T20:03:10 by JumpMan Jones
0
David Sherwood

vb to c# converted a declaration with dynamic instead of var

The Vb code was:
Dim mIncludedItems = aItems.Where(Function(x) pSelectionFilterers.All(Function(y) y.IsFilteredIncluded(x)))
and the C# code was:
dynamic mIncludedItems = aItems.Where(x => pSelectionFilterers.All(y => y.IsFilteredIncluded(x)));

"dynamic" should be "var"
Feedback by David Sherwood Status: Not Done Comments: 1 Last update: 2014-12-08T14:59:49 by Matthieu Penant
0
Frank Lenoir

Conversion error From, Order By and Select clauses

The following C# code converts incorrect to VB

This C# code:
public string[] CustomPropertyNames
{
get
{
return (from p in _customProps orderby p.Key ascending select p.Key).ToArray();
}
}

converts to:
Public ReadOnly Property CustomPropertyNames() As String()
Get
Return (From p In _customPropsOrder By p.Key Ascendingp.Key).ToArray()
End Get
End Property

The result should be:
Public ReadOnly Property CustomPropertyNames() As String()
Get
Return (From p In _customProps Order By p.Key Ascending Select p.Key).ToArray()
End Get
End Property


Regards,
Frank Lenoir
Problem by Frank Lenoir Status: Not Done Comments: 0 Last update: 2014-11-20T10:48:04 by Frank Lenoir
0
Richard Oberholz

Fix the output window so it displays larger than 1 inch by 1 inch for IE 11

See attach .jpg image.
Problem by Richard Oberholz Status: Not Done Comments: 0 Attachments: 1 Last update: 2014-10-28T18:25:46 by Richard Oberholz
0
Donald Record

Small Change Needed

I went to convert the following line from VB to C#:

"oReader = oCommand.ExecuteReader"

(oReader is a System.Data.SqlClient.SqlDataReader)
(oCommand is a System.Data.SqlClient.SqlCommand)

The Code Converter gave me this in C#:

"oReader == oCommand.ExecuteReader"
1. gives me the == comparison operator, which should be "=".
2. Does not give "()" at the end.
3. No ";", not a big deal.

This is the correct C#:
"oReader = oCommand.ExecuteReader();"

Thank you, I am just trying to help.
Problem by Donald Record Status: Not Done Comments: 0 Last update: 2014-10-23T02:19:57 by Donald Record
0
Abraham Pearson

spelling mistake - "Convertion" on http://converter.telerik.com/about.aspx

Feedback by Abraham Pearson Status: In Progress Comments: 0 Last update: 2014-10-17T07:08:25 by Vladimir Dragoev
0
Dennis Joachimsthaler

VB await statements fail complete file with error

This is the error:

-- line 40 col 40: this symbol not expected in EndOfStmt

Column 40 was the space after the "Await" keyword.
Feedback by Dennis Joachimsthaler Status: Not Done Comments: 0 Last update: 2014-10-10T07:43:37 by Dennis Joachimsthaler
0
Greg B

MarkDown Converter

I use Code converter all the time! Love it. Thank you.

May want to run some tests against the Markdown Lib.
https://code.google.com/p/markdownsharp/source/browse/MarkdownSharp/Markdown.cs

There are definitely issues with C# to VB comments in RegEx. Also, issues with 'var' in FOR loops. And a couple other issues.
developerfusion does slightly better job with code errors into VB, but there are definitely some issues with Regex in both.
Feedback by Greg B Status: Not Done Comments: 0 Last update: 2014-10-09T08:53:14 by Greg B
0
Yazan Kioumgi

fix array indexing Syntax

From VB to C#: array syntax is not correct.

VB Code:

Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound
If TypeOf e.Item Is GridDataItem Then
Dim item As GridDataItem = e.Item

Dim lnkButton As ImageButton = item("EditCommandColumn").Controls(0)
End If
End Sub

Parentheses should be replaced by brackets. Note the C# output:


protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
if (e.Item is GridDataItem) {
GridDataItem item = e.Item;

ImageButton lnkButton = item("EditCommandColumn").Controls(0);
}
}
Problem by Yazan Kioumgi Status: Not Done Comments: 0 Last update: 2014-08-13T21:10:59 by Yazan Kioumgi
0
Displaying items 51 - 60 of 77