This is a migrated thread and some comments may be shown as answers.

NRefactory->Code Converter

1 Answer 275 Views
Code Converter
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Chris
Top achievements
Rank 1
Chris asked on 27 Sep 2007, 12:34 PM
This is not for asp.net, but figured you might be able to pass this off to the correct place. The code converter sidebar tool maintained by Todd Anglin has a small bug in it. Its more of a facial feature.

When converting from VB->C# it will not convert if the casing in the statement in the VB code are not correct. VB Is not a case sensitive language but the IDE in vb will capitalize things for you. IE:

VB Code:

Public Class Test
End Class Test

is the same as:

public class Test
end class Test

In your code converter if you miss the capitalization of the keywords it returns an unknown error. I don't know if this is a problem with NRefactory or with the actual converter utility itself, but as released through your company I figured you guys would know how to handle this bug report.

Now I definitely agree with the fact that good coding practice would be to follow case. But with the fact that conversion to C# is all lower case anyway.. (Call it laziness) I decided to try it out.

Chris

1 Answer, 1 is accepted

Sort by
0
Todd Anglin
Top achievements
Rank 2
answered on 17 Dec 2007, 10:34 PM
Chris-

Sorry I didn't see this post earlier. This is probably a problem with NRefactory, but I don't the problem exists as you've described. In my tests with the online converter (converter.telerik.com, which uses the same converting engine), the conversions had no problem with these formats:

Public Class Test
...body
End Class

OR

public class Tests
...body
end class

Where it did seem to choke was on the capitalization of the sub methods. More specifically, it would not successfully convert if the "End Sub" keywords were in lower case. I'm not sure why the NRefactory engine chokes on this scenario, but I'll definitely pass along the feedback.

-Todd
Tags
Code Converter
Asked by
Chris
Top achievements
Rank 1
Answers by
Todd Anglin
Top achievements
Rank 2
Share this question
or