NRefactory->Code Converter

2 posts, 0 answers
  1. Chris
    Chris avatar
    1 posts
    Member since:
    Sep 2007

    Posted 27 Sep 2007 Link to this post

    This is not for, 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.

  2. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 17 Dec 2007 Link to this post


    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 (, which uses the same converting engine), the conversions had no problem with these formats:

    Public Class Test
    End Class


    public class Tests
    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.

Back to Top