Click here to Skip to main content
15,895,011 members
Home / Discussions / C#
   

C#

 
GeneralRe: Assembly - from Unmanaged Pin
Heath Stewart25-Mar-04 9:35
protectorHeath Stewart25-Mar-04 9:35 
GeneralRe: Assembly - from Unmanaged Pin
Jeremy Kimball25-Mar-04 9:46
Jeremy Kimball25-Mar-04 9:46 
GeneralTo Heath (we talked about this subject before) Pin
profoundwhispers24-Mar-04 9:10
profoundwhispers24-Mar-04 9:10 
GeneralRe: To Heath (we talked about this subject before) Pin
Tom Larsen24-Mar-04 9:14
Tom Larsen24-Mar-04 9:14 
GeneralRe: To Heath (we talked about this subject before) Pin
profoundwhispers24-Mar-04 9:32
profoundwhispers24-Mar-04 9:32 
GeneralRe: To Heath (we talked about this subject before) Pin
Heath Stewart24-Mar-04 9:15
protectorHeath Stewart24-Mar-04 9:15 
GeneralRe: To Heath (we talked about this subject before) Pin
profoundwhispers24-Mar-04 9:31
profoundwhispers24-Mar-04 9:31 
GeneralRe: To Heath (we talked about this subject before) Pin
Heath Stewart24-Mar-04 9:39
protectorHeath Stewart24-Mar-04 9:39 
There's nothing wrong with it, but what I was referring to in the previous post could result in your settings being loaded more than once. Now, this probably wouldn't be a problem, but locking your resources will gaurantee that it wouldn't.

I'm not trying to down-play your approach, only present different ideas. It's you're implementation - do what you want. Smile | :)

Typically in a singleton you provide static methods and properties and hide instance details from other classes. For instance, you could also have your Save method as static and it gets the private Instance property (or uses your GetInstance method) and saves the data. For the caller then, it's as simple as doing MySettings.Save.

Again, just some things to think about. Your approach would work fine in most cases (only may become a problem with multiple AppDomains in a single process, which may not apply).

 

Microsoft MVP, Visual C#
My Articles
GeneralWindows Media Player Pin
antoine@orchus-tech24-Mar-04 7:36
antoine@orchus-tech24-Mar-04 7:36 
GeneralRe: Windows Media Player Pin
Heath Stewart24-Mar-04 8:35
protectorHeath Stewart24-Mar-04 8:35 
GeneralRe: Windows Media Player Pin
antoine@orchus-tech24-Mar-04 9:38
antoine@orchus-tech24-Mar-04 9:38 
GeneralRe: Windows Media Player Pin
Heath Stewart24-Mar-04 9:42
protectorHeath Stewart24-Mar-04 9:42 
GeneralRe: Windows Media Player Pin
antoine@orchus-tech24-Mar-04 9:58
antoine@orchus-tech24-Mar-04 9:58 
GeneralRe: Windows Media Player Pin
Stephane Rodriguez.24-Mar-04 19:03
Stephane Rodriguez.24-Mar-04 19:03 
QuestionHow to enumerate an enum. Pin
Anonymous24-Mar-04 6:56
Anonymous24-Mar-04 6:56 
AnswerRe: How to enumerate an enum. Pin
CStiefeling24-Mar-04 8:16
CStiefeling24-Mar-04 8:16 
AnswerRe: How to enumerate an enum. Pin
T Manjaly24-Mar-04 11:49
T Manjaly24-Mar-04 11:49 
GeneralaxWebBrowser DocumentComplete Pin
Jasper4C#24-Mar-04 6:47
Jasper4C#24-Mar-04 6:47 
GeneralRe: axWebBrowser DocumentComplete Pin
Heath Stewart24-Mar-04 8:40
protectorHeath Stewart24-Mar-04 8:40 
GeneralRe: axWebBrowser DocumentComplete Pin
Dave Kreskowiak24-Mar-04 8:42
mveDave Kreskowiak24-Mar-04 8:42 
GeneralRe: axWebBrowser DocumentComplete Pin
Heath Stewart24-Mar-04 9:03
protectorHeath Stewart24-Mar-04 9:03 
GeneralRe: axWebBrowser DocumentComplete Pin
Jeremy Kimball24-Mar-04 9:27
Jeremy Kimball24-Mar-04 9:27 
GeneralRe: axWebBrowser DocumentComplete Pin
Dave Kreskowiak24-Mar-04 9:28
mveDave Kreskowiak24-Mar-04 9:28 
GeneralRe: axWebBrowser DocumentComplete Pin
Heath Stewart24-Mar-04 9:29
protectorHeath Stewart24-Mar-04 9:29 
GeneralRe: axWebBrowser DocumentComplete Pin
Dave Kreskowiak24-Mar-04 9:35
mveDave Kreskowiak24-Mar-04 9:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.