Telerik Code Converter is impressive
I believe this is something new which I will recommend you all to check this out. You can see this link here http://converter.telerik.com/
I had tried with couple of .NET 2.0 codes and it worked fine. Pretty impressive. I tried with a basic example below on a method returning a generic list type.
C#
public List<DropDownListBase> BindSecondaryDropDown()
{
Search search = MapViewToSearch();
List<DropDownListBase> dropList = null;
if (search != null)
{
if (rfView.IsFundType)
{
dropList = SearchData.GetTypeList(search);
}
if (rfView.IsSchemeName)
{
dropList = SearchData.GetNameList(search);
}
}
else
{
dropList = new List<DropDownListBase>();
}
return dropList;
}
Below was the generated VB.NET code
Public Function BindSecondaryDropDown() As List(Of DropDownListBase)
Dim search As Search = MapViewToSearch()
Dim dropList As List(Of DropDownListBase) = Nothing
If search <> Nothing Then
If rfView.IsFundType Then
dropList = SearchData.GetTypeList(search)
End If
If rfView.IsSchemeName Then
dropList = SearchData.GetNameList(search)
End If
Else
dropList = New List(Of DropDownListBase)()
End If
Return dropList
End Function
In order to confirm the conversion was accurate, I tried to copy paste that vb.net code and generated back to c#. It was the same piece of code.
Very nice written converter. :) Good work Telerik.