I think it's a fairly verbose way of exposing app settings. How about this?
enter image description here
(taken from an answer on this SO question this SO question)
This essentially comes down to what @KonradRudolph's comment was saying - the reason you "need" your Settings
module is probably because the settings' access modifier is set to Internal
, which means it's not accessible to other assemblies.
If you need to expose app settings to other assemblies, you just change that access modifier to Public
and you're done.
Doing this:
Public Module Settings
Public Property AppSettings As Settings
Get
Return My.Settings
End Get
End Property
End Module
Is then totally redundant. Even more so, doing what you've done (exposing each setting individually) becomes more painful to maintain than it needs to be; if the settings are public then you expose the settings class itself and whatever you change is immediately available to client assemblies.
I think it's a fairly verbose way of exposing app settings. How about this?
enter image description here
(taken from an answer on this SO question)
This essentially comes down to what @KonradRudolph's comment was saying - the reason you "need" your Settings
module is probably because the settings' access modifier is set to Internal
, which means it's not accessible to other assemblies.
If you need to expose app settings to other assemblies, you just change that access modifier to Public
and you're done.
Doing this:
Public Module Settings
Public Property AppSettings As Settings
Get
Return My.Settings
End Get
End Property
End Module
Is then totally redundant. Even more so, doing what you've done (exposing each setting individually) becomes more painful to maintain than it needs to be; if the settings are public then you expose the settings class itself and whatever you change is immediately available to client assemblies.
I think it's a fairly verbose way of exposing app settings. How about this?
enter image description here
(taken from an answer on this SO question)
This essentially comes down to what @KonradRudolph's comment was saying - the reason you "need" your Settings
module is probably because the settings' access modifier is set to Internal
, which means it's not accessible to other assemblies.
If you need to expose app settings to other assemblies, you just change that access modifier to Public
and you're done.
Doing this:
Public Module Settings
Public Property AppSettings As Settings
Get
Return My.Settings
End Get
End Property
End Module
Is then totally redundant. Even more so, doing what you've done (exposing each setting individually) becomes more painful to maintain than it needs to be; if the settings are public then you expose the settings class itself and whatever you change is immediately available to client assemblies.
I think it's a fairly verbose way of exposing app settings. How about this?
enter image description here
(taken from an answer on this SO question)
This essentially comes down to what @KonradRudolph's comment was saying - the reason you "need" your Settings
module is probably because the settings' access modifier is set to Internal
, which means it's not accessible to other assemblies.
If you need to expose app settings to other assemblies, you just change that access modifier to Public
and you're done.
Doing this:
Public Module Settings
Public Property AppSettings As Settings
Get
Return My.Settings
End Get
End Property
End Module
Is then totally redundant. Even more so, doing what you've done (exposing each setting individually) becomes more painful to maintain than it needs to be; if the settings are public then you expose the settings class itself and whatever you change is immediately available to client assemblies.
I think it's a fairly verbose way of exposing app settings. How about this?
enter image description here
(taken from an answer on this SO question)
I think it's a fairly verbose way of exposing app settings. How about this?
enter image description here
(taken from an answer on this SO question)
This essentially comes down to what @KonradRudolph's comment was saying - the reason you "need" your Settings
module is probably because the settings' access modifier is set to Internal
, which means it's not accessible to other assemblies.
If you need to expose app settings to other assemblies, you just change that access modifier to Public
and you're done.
Doing this:
Public Module Settings
Public Property AppSettings As Settings
Get
Return My.Settings
End Get
End Property
End Module
Is then totally redundant. Even more so, doing what you've done (exposing each setting individually) becomes more painful to maintain than it needs to be; if the settings are public then you expose the settings class itself and whatever you change is immediately available to client assemblies.
I think it's a fairly verbose way of exposing app settings. How about this?
enter image description here
(taken from an answer on this SO question)