Convert Short Class Code From C# to VB.NET

Could someone help convert the following code into VB.NET so I can understand and use/extend it.

// Class to hold setting information
public class ClockSetting
    private int _someValue;public ClockSetting() { }
    public int SomeValue
        get{ return _someValue; }
        set{ _someValue = value; }

// This class inherits from ApplicationSettingsBase.
// The only property being persisted
// is a collection of ClockSetting objects.
// This allows the settings for each clock
// created by the user to be stored and loaded with minimal coding.
public class TimePieceSettings : ApplicationSettingsBase
    public List<ClockSetting> ClockSettings
        get { return (List<ClockSetting>)this["ClockSettings"]; }
        set { this["ClockSettings"] = (List<ClockSetting>)value; }
// Loading the settings
_settings = new TimePieceSettings();
foreach (ClockSetting setting in _settings.ClockSettings)
//Saving the settings
foreach(Clock clock in _layoutPanel.Controls)
    ClockSetting instance = CreateSetting(clock);
Who is Participating?
mrichmonConnect With a Mentor Commented:
The only thing the converters didn't like is the Generic Lists because of the < >


Public Class ClockSetting
    Private Integer _someValue
    Public  Sub New()
    End Sub
    Public Property SomeValue() As Integer
               Return _someValue
          End Get
          Set (ByVal Value As Integer)
               _someValue = value
          End Set
    End Property
End Class

public class TimePieceSettings Inherits ApplicationSettingsBase
Public Property ClockSettings As List(Of ClockSetting)
Return (List(Of ClockSetting))this("ClockSettings")
End Get
Set (ByVal Value As List(Of ClockSetting))
this("ClockSettings") = value
End Set
End Property
End Class

Dim setting As ClockSetting
For Each setting In _settings.ClockSettings
'Saving the settings
Dim clock As Clock
For Each clock In _layoutPanel.Controls
    Dim instance As ClockSetting =  CreateSetting(clock)

endrecAuthor Commented:
These converters will not work on the code above.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.