Brian Mains

select keyword not converted correctly from C# to VB

See the differences in query; the C# was the original, the VB the generated. Note the C# "select p" is converted over with no "select", presumably because select is a VB keyword:

property = (from t in containerType.GetInterfaces()
let p = GetTypeDescriptor(t).GetProperties()
.Find(propertyName, true)
where p != null
select p

[property] = (From t In containerType.GetInterfaces()Let p = GetTypeDescriptor(t).GetProperties().Find(propertyName, True) Where p IsNot Nothingp).FirstOrDefault()

C# has where p != null select p, VB has Where p ISNot Nothingp, where the p is pushed against the "Nothing" keyword.
Problem by Brian Mains Status: Not Done Comments: 1 Last update: 2017-05-18T20:18:53 by Excel-galaxy Ajah Anayo
Sabata Mereeotlhe

Math and String functions

I am currently working on a engineering piece of software and convert old vb6 to c# 4.6

1. I have had quite a few times that I needed to add Math. in front of the converted c# code eg.

Log => Math.Log

This might be the case with other Math functions

2. I have had to change the statement of counting the length of a string and other string functions as follows

Len(string) => string.Length
Mid(string, int, int) => string.Substring(int, int)

This could be the case with other string functions
Feedback by Sabata Mereeotlhe Status: Not Done Comments: 1 Last update: 2017-04-14T02:42:19 by Bettyjowhitfield Hunt
Dimitar Karamfilov

a Client reported that the batch page of the converter does not work

It should be either removed or redirected:

This is the page:

Thanks in advance.
Problem by Dimitar Karamfilov Status: Not Done Comments: 0 Last update: 2017-03-23T12:43:36 by Dimitar Karamfilov
Chanchal Ingale

'Handles MyBase.Load' should be appended to event while converting Page_Load method from to

I was converting 'protected void Page_Load(object sender, EventArgs e)' from C# to VB and it returned me 'Protected Sub Page_Load(sender As Object, e As EventArgs)' where as expected was 'Protected Sub Page_Load(sender As Object, e As EventArgs) Handles MyBase.Load'. This caused me couple of hours to detect as I was considering that conversion is 100% correct. I understand and appreciate this converter and understand this is evolving product, Hence thought should report same to you guys. Keep it up with your good Work.
Problem by Chanchal Ingale Status: Not Done Comments: 0 Last update: 2017-01-25T15:39:51 by Chanchal Ingale
Israel Aguasanta

cshtml/ vbhtml.

Would be great a converter for cshtml to vbhtml and vice versa.
Idea by Israel Aguasanta Status: Not Done Comments: 2 Last update: 2017-01-05T14:56:12 by Caty Hespel
Shubham Singh


converting from c# to Vb-

public ActionResult MyNextAction()
return Redirect(Request.Referrer.ToString());

Converts to-

public ActionResult MyNextAction()
return Redirect(Request.UrlReferrer.ToString());
Feedback by Shubham Singh Status: Not Done Comments: 0 Last update: 2016-12-06T14:31:17 by Shubham Singh
Darkie Doom

using != if

Using gZipStream = New GZipStream(memoryStream, CompressionMode.Decompress)
Converts to
using (gZipStream == new GZipStream(memoryStream, CompressionMode.Decompress))

Correct one would be
using (var gZipStream = new GZipStream(memoryStream, CompressionMode.Decompress))
Feedback by Darkie Doom Status: Not Done Comments: 0 Last update: 2016-09-29T12:59:01 by Darkie Doom
nav037 -

array of anonymous type ( to c#)

Dim plans() = {New With {Key .ParentId = 100000010, Key .ChildId = 100000011}, New With {Key .ParentId = 100000012, Key .ChildId = 100000013}}
It should be converted so
var plans = new[] { new { ParentId = 100000010, ChildId = 100000011 }, new { ParentId = 100000012, ChildId = 100000013 } };
Now converted into a nonworking crap
[] plans = {
new {
ParentId = 100000010,
ChildId = 100000011
new {
ParentId = 100000012,
ChildId = 100000013
Problem by nav037 - Status: Not Done Comments: 0 Last update: 2016-09-20T10:05:06 by nav037 -
Nicholas De La Haye

c# Operators ++ and -- are converted incorrectly to

When converting c# to the operators ++ and -- is converted incorrectly which gives incorrect results then from the original code. Consider the following c# example:- TestValue = TestArray[Index++];

This code uses the original value of say 0 in the variable "Index" and then increments the value afterwards. But converting this code to VB. net does not do this!

After conversion we get the following:-
TestValue = TestArray(System.Math.Max(System.Threading.Interlocked.Increment(Index),Index - 1))

The converted code always increments the value first and never uses the initial value of say 0 before it is incremented. You use a the function Max which take the highest value, but your use of Max never uses "Index - 1" as its always less, making it pointless to use the Max function. The proper conversion would be:
TestValue = TestArray(Index)

Please can you fix this bug?
Problem by Nicholas De La Haye Status: Not Done Comments: 1 Last update: 2016-08-22T15:22:26 by Nicholas De La Haye
Ulaş Şenol

Request.QueryString(string value) to Request.QueryString[string value]

I'm working convert vb to c#. Please do Request.QueryString(string value) to Request.QueryString[string value]
Feedback by Ulaş Şenol Status: Not Done Comments: 0 Last update: 2016-08-17T07:14:47 by Ulaş Şenol
Displaying items 21 - 30 of 91