VB
=====================
Public Interface IProcess
ReadOnly Property Title( ) As String
...
End Interface
Public Class ProcessBase Inherits System.Web.UI.UserControl Implements
IProcess
Sub New( )
MyBase.New( )
End Sub
...
End Class
C# Conversion
=====================
public interface IProcess
{
string Title
{ get; }
...
}
public class ProcessBase : System.Web.UI.UserControl, IProcess
{
ProcessBase( )
{
// System.Web.UI.UserControl does not contain a definition for 'New'
base.New( );
}
public virtual string Title
{
get { }
}
....
}
Question:
=====================
What is missing from this VB to C# conversion that will resolve compiler
errors?
For brevity I've only shown one data member "Title" of type string.
Clearly the VB 'New' keyword is not supported in C#. If I comment out
the entire C# ProcessBase( ) constructor and let C# create its own default
constructor the compiler still complains...
'MyNameSpace.ProcessBase.Title.get': 'not all code paths return a value
The C# was generated from converters [1],[2]. I hope somebody
may be able to explain how to resolve this issue. Thanks for comments...
--
<%= Clinton Gallagher
[1] http://developerfusion.com/utilities...btocsharp.aspx
[2] http://www.wimontheweb.com/ca_main.aspx