need help converting C# to vb.net

  • Thread starter Thread starter TJS
  • Start date Start date
T

TJS

C# version is below
================================

namespace LicensedControls {

[
LicenseProvider(typeof(ExpiringLicenseProvider))
]
public class ExpiringLicensedLabel : Label {

public ExpiringLicensedLabel() {
LicenseManager.Validate(typeof(ExpiringLicensedLabel));
}
}
}

my attempt to get vb
=========================

Namespace LicensedControls
<LicenseProvider(GetType(ExpiringLicenseProvider))>

Public Class ExpiringLicensedLabel
Inherits Label

Public Sub New()
LicenseManager.Validate(GetType(ExpiringLicensedLabel))
End Sub
End Class
End Namespace


fails to compile on ">"
 
Try this:



Namespace LicensedControls

<LicenseProvider(GetType(ExpiringLicenseProvider))> _
Public Class ExpiringLicensedLabel
Inherits Label

Public Sub New()
LicenseManager.Validate(GetType(ExpiringLicensedLabel))
End Sub
End Class
End Namespace
 
there ya go !

Namespace LicensedControls
<LicenseProvider(GetType(ExpiringLicenseProvider))> _

Public Class ExpiringLicensedLabel
Inherits Label


Public Sub New()
LicenseManager.Validate(GetType(ExpiringLicensedLabel))
End Sub 'New
End Class 'ExpiringLicensedLabel
End Namespace 'LicensedControls


Regards - OHM

C# version is below
================================

namespace LicensedControls {

[
LicenseProvider(typeof(ExpiringLicenseProvider))
]
public class ExpiringLicensedLabel : Label {

public ExpiringLicensedLabel() {
LicenseManager.Validate(typeof(ExpiringLicensedLabel));
}
}
}

my attempt to get vb
=========================

Namespace LicensedControls
<LicenseProvider(GetType(ExpiringLicenseProvider))>

Public Class ExpiringLicensedLabel
Inherits Label

Public Sub New()
LicenseManager.Validate(GetType(ExpiringLicensedLabel))
End Sub
End Class
End Namespace


fails to compile on ">"
 
Hi,

In the visual basic.net resource kit on the additional resources tab
under usefull utilities there is a visual c# to vb.net converter.

Ken
 
thanks ,

I also found there cannot be a blank line after the line continuation
character
 
great idea, but download time is 30 hrs


Ken Tucker said:
Hi,

In the visual basic.net resource kit on the additional resources tab
under usefull utilities there is a visual c# to vb.net converter.

Ken
--------------------
TJS said:
C# version is below
================================

namespace LicensedControls {

[
LicenseProvider(typeof(ExpiringLicenseProvider))
]
public class ExpiringLicensedLabel : Label {

public ExpiringLicensedLabel() {
LicenseManager.Validate(typeof(ExpiringLicensedLabel));
}
}
}

my attempt to get vb
=========================

Namespace LicensedControls
<LicenseProvider(GetType(ExpiringLicenseProvider))>

Public Class ExpiringLicensedLabel
Inherits Label

Public Sub New()
LicenseManager.Validate(GetType(ExpiringLicensedLabel))
End Sub
End Class
End Namespace


fails to compile on ">"
 
Back
Top