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
Alfred Ruffner

true c# indexing of dataset / table / rows needs work .... they come out as function () instead of []

true c# indexing of dataset / table / rows needs work .... they come out as function () instead of []
Problem by Alfred Ruffner Status: Not Done Comments: 1 Last update: 2014-07-28T16:22:13 by Hugo Furth
0
roy bartels

Converting c# event handlers to RemoveHandler and AddHandler

Although this problem was marked as done on 09 August 2013, when testing it with the following code it did not correctly convert the key down event handlers.

void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)

{

GridSpinEditor editor = e.ActiveEditor as GridSpinEditor;

if (editor != null)

{

GridSpinEditorElement element = editor.EditorElement as GridSpinEditorElement;

element.InterceptArrowKeys = false;

element.KeyDown -= new KeyEventHandler(element_KeyDown);

element.KeyDown += new KeyEventHandler(element_KeyDown);

}

}



void element_KeyDown(object sender, KeyEventArgs e)

{

if (e.KeyData == Keys.Up)

{

radGridView1.GridNavigator.SelectPreviousRow(1);

}

if (e.KeyData == Keys.Down )

{

radGridView1.GridNavigator.SelectNextRow(1);

}

}
Problem by roy bartels Status: Not Done Comments: 0 Last update: 2014-07-17T11:25:32 by roy bartels
0
Gary Rusher

Bug

m_callbackType = DirectCast(_a(0), ServiceContractAttribute).CallbackContract

converted to C#

m_callbackType == ((ServiceContractAttribute)_a(0)).CallbackContract

Should be

m_callbackType == ((ServiceContractAttribute)_a[0]).CallbackContract
Problem by Gary Rusher Status: Not Done Comments: 0 Last update: 2014-06-02T13:30:12 by Gary Rusher
0
Rbenutzer Muehsam

KeyPressEvent and check for keys.enter

C#:
private void txtName_KeyPress(object sender, KeyPressEventArgs e)
{
if ((Keys)e.KeyChar == Keys.Enter)
{
//Do something
}
}

will be converted wrong. A working solution for VB.NET would be:

Private Sub txtName_KeyPress(sender As Object, e As KeyPressEventArgs)
If e.KeyChar = Convert.ToChar(Keys.Return) Then
' Do something
End If
End Sub
Problem by Rbenutzer Muehsam Status: Not Done Comments: 0 Last update: 2014-06-01T12:03:50 by Rbenutzer Muehsam
0
Rbenutzer Muehsam

String array with multiple content, separated by comma

C#:
var reservedWords = new[]
{
"CON", "PRN", "AUX",
};

will be wrongly converted. A working solution for VB.NET would be:

Dim reservedWords() As String = {"CON", "PRN", "AUX"}
Problem by Rbenutzer Muehsam Status: Not Done Comments: 0 Last update: 2014-06-01T11:50:50 by Rbenutzer Muehsam
0
Displaying items 51 - 60 of 71