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
Jason Alls

transforming lambda

C# Code:
----------
public class ShipDetails
{
public string ShipName { get; set; }
public string ShipAddress { get; set; }
public double Freight { get; set; }
public DateTime ShippedDate { get; set; }
public string ShipCity { get; set; }
public string ShipCountry { get; set; }
public string OrderID { get; set; }
public static IList GetData(string orderId)
{
List<ShipDetails> ShipDetailsCollection = new List<ShipDetails>();
ShipDetails shipDetail = null;
shipDetail = new ShipDetails()
{
ShipName = "Vins Chevalier",
ShipAddress = "59 rue de l'Abbaye",
Freight = 32.38,
ShippedDate = new DateTime(2003,12,23),
ShipCity = "Reims",
ShipCountry = "France",
OrderID = "10248"
};
ShipDetailsCollection.Add(shipDetail);

shipDetail = new ShipDetails()
{
ShipName = "Vins",
ShipAddress = "59 rue",
Freight = 32.38,
ShippedDate = new DateTime(2003, 12, 23),
ShipCity = "Reims",
ShipCountry = "France",
OrderID = "10249"
};
ShipDetailsCollection.Add(shipDetail);

return ShipDetailsCollection.Where(sd => sd.OrderID.Equals(orderId)).ToList();
}
}

VB.NET Code:
---------------

Public Class ShipDetails
Public Property ShipName() As String
Get
Return m_ShipName
End Get
Set
m_ShipName = Value
End Set
End Property
Private m_ShipName As String
Public Property ShipAddress() As String
Get
Return m_ShipAddress
End Get
Set
m_ShipAddress = Value
End Set
End Property
Private m_ShipAddress As String
Public Property Freight() As Double
Get
Return m_Freight
End Get
Set
m_Freight = Value
End Set
End Property
Private m_Freight As Double
Public Property ShippedDate() As DateTime
Get
Return m_ShippedDate
End Get
Set
m_ShippedDate = Value
End Set
End Property
Private m_ShippedDate As DateTime
Public Property ShipCity() As String
Get
Return m_ShipCity
End Get
Set
m_ShipCity = Value
End Set
End Property
Private m_ShipCity As String
Public Property ShipCountry() As String
Get
Return m_ShipCountry
End Get
Set
m_ShipCountry = Value
End Set
End Property
Private m_ShipCountry As String
Public Property OrderID() As String
Get
Return m_OrderID
End Get
Set
m_OrderID = Value
End Set
End Property
Private m_OrderID As String
Public Shared Function GetData(orderId As String) As IList
Dim ShipDetailsCollection As New List(Of ShipDetails)()
Dim shipDetail As ShipDetails = Nothing
shipDetail = New ShipDetails() With { _
Key .ShipName = "Vins Chevalier", _
Key .ShipAddress = "59 rue de l'Abbaye", _
Key .Freight = 32.38, _
Key .ShippedDate = New DateTime(2003, 12, 23), _
Key .ShipCity = "Reims", _
Key .ShipCountry = "France", _
Key .OrderID = "10248" _
}
ShipDetailsCollection.Add(shipDetail)

shipDetail = New ShipDetails() With { _
Key .ShipName = "Vins", _
Key .ShipAddress = "59 rue", _
Key .Freight = 32.38, _
Key .ShippedDate = New DateTime(2003, 12, 23), _
Key .ShipCity = "Reims", _
Key .ShipCountry = "France", _
Key .OrderID = "10249" _
}
ShipDetailsCollection.Add(shipDetail)

Return ShipDetailsCollection.Where(Function(sd) sd.OrderID.Equals(orderId)).ToList()
End Function
End Class

'=======================================================
'Service provided by Telerik (www.telerik.com)
'Conversion powered by NRefactory.
'Twitter: @telerik
'Facebook: facebook.com/telerik
'=======================================================

Problem:
----------
shipDetail = New ShipDetails() With { _
Key .ShipName = "Vins", _

Should be:

shipDetail = New ShipDetails() With { _
ShipName = "Vins", _
Problem by Jason Alls Status: Not Done Comments: 1 Last update: 2014-08-12T09:04:19 by Jason Alls
0
Displaying items 51 - 60 of 76