Tell me more ×
Code Review Stack Exchange is a question and answer site for peer programmer code reviews. It's 100% free, no registration required.

I define in the Settings Tab of a VB.Net class library some user scoped settings. I want to expose these settings to other projects that reference the class library. I chose to do this using a public Module. This works, but it requires exposing each and every setting manually. Is there a better way?

Public Module Settings

Public Property SomeSetting As Integer
    Get
        Return My.Settings.SomeSetting
    End Get
    Set(value As Integer)
        My.Settings.SomeSetting = value
        My.Settings.Save()
    End Set
End Property

End Module

share|improve this question
You could expose the Settings module wholesale. – Konrad Rudolph Jan 15 at 10:09
@KonradRudolph Can you elaborate? – Dabblernl Jan 15 at 10:28
Just have a (read-only) property which returns the My.Settings object (no setter required). – Konrad Rudolph Jan 15 at 10:47

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.