Using .NET:
In my winforms application i have about 10-15 global strings that are used for various settings.
I've contemplated moving them into a class, but we're debating which to do:
a shared function or a public property.
Shared function benefit: doesnt stay in memory.
Public readonly property: code only run once.
The strings are determined by very simple string concatenations:
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "\MyProgram\"
One of them is the path to save files, so it gets run every few minutes when the user saves the document.
So, which would be "better"? I know it's up to opinion most of them time but I'm looking for something I might've overseen.
In my winforms application i have about 10-15 global strings that are used for various settings.
I've contemplated moving them into a class, but we're debating which to do:
a shared function or a public property.
Shared function benefit: doesnt stay in memory.
Public readonly property: code only run once.
The strings are determined by very simple string concatenations:
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "\MyProgram\"
One of them is the path to save files, so it gets run every few minutes when the user saves the document.
So, which would be "better"? I know it's up to opinion most of them time but I'm looking for something I might've overseen.