properties global problem

2 posts, 0 answers
  1. Bruno
    Bruno avatar
    11 posts
    Member since:
    Jan 2009

    Posted 23 Jan 2009 Link to this post

    This problem happens in almost all converts

    from C#

    public string myVar { getset; } 

    to VB:

    Public Property myVar() As String 
        Get 
        End Get 
        Set 
        End Set 
    End Property 

    witch is very wrong as you can see, it should be:

    Private _myVar As String  
    Public Property myVar() As String  
      Get  
        return _myVar  
      End Get  
      Set  
        _myVar = value  
      End Set  
    End Property  

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

    Posted 23 Jan 2009 Link to this post

    Bruno-

    Thanks for reporting the issue. You are correct- the Code Converter does not handle automatic properties very well. This is a problem in the root coversion engine, NRefactory. In fact, you verfiy this by running your conversion the SharpDevelop converter (the people that work on building NRefactory):


    I'd suggest sending the feedback via the NRefactory bug reporting forum, which is located here:

    http://community.sharpdevelop.net/forums/19/ShowForum.aspx

    Hopefully that helps. I apologize that the converter cannot handle this new C# feature. Hopefully the NRefactory project will be able to find a way to support automatic properties in the future!

    -Todd
Back to Top