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

properties global problem

1 Answer 51 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.
Bruno
Top achievements
Rank 2
Bruno asked on 23 Jan 2009, 12:41 PM
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

1 Answer, 1 is accepted

Sort by
0
Todd Anglin
Top achievements
Rank 2
answered on 23 Jan 2009, 03:40 PM
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
Tags
Code Converter
Asked by
Bruno
Top achievements
Rank 2
Answers by
Todd Anglin
Top achievements
Rank 2
Share this question
or