Click here to Skip to main content
15,886,873 members
Home / Discussions / C#
   

C#

 
GeneralRe: convert projet from vb6 to vb.net Pin
toto_201016-Apr-10 0:23
toto_201016-Apr-10 0:23 
QuestionC# for BlackBerry Pin
Jassim Rahma15-Apr-10 5:53
Jassim Rahma15-Apr-10 5:53 
AnswerRe: C# for BlackBerry Pin
DaveyM6915-Apr-10 6:11
professionalDaveyM6915-Apr-10 6:11 
QuestionHow to force static instances of a class to initialize? [Solved] Pin
thugthug15-Apr-10 4:30
thugthug15-Apr-10 4:30 
AnswerRe: How to force static instances of a class to initialize? Pin
PIEBALDconsult15-Apr-10 4:50
mvePIEBALDconsult15-Apr-10 4:50 
QuestionRe: How to force static instances of a class to initialize? Pin
Keith Barrow15-Apr-10 5:09
professionalKeith Barrow15-Apr-10 5:09 
AnswerRe: How to force static instances of a class to initialize? Pin
thugthug15-Apr-10 6:13
thugthug15-Apr-10 6:13 
GeneralRe: How to force static instances of a class to initialize? Pin
Keith Barrow15-Apr-10 6:46
professionalKeith Barrow15-Apr-10 6:46 
Well a few things occurred to me:

1. I'd have an ITranslator interface and have a dictionary of that. Minor point.

2. Having the Translator base class maintain a list of translators smacks of bad OO abstraction/separation of concerns, a translator translates for a language, it doesn't keep a list translators. I also think it makes the symantics of accessing a translator a little wierd. You might have a good reasons for doing this, however.

3. Following on from 2, I'd have a Singleton (or possibly static) object responsible for maintaining a the Dictionary of translators. You can lazily load the dictionaries, and/or initialise some at startup. The will also help to separate the concerns and will make the loading code clearer as it isn't in with the translation stuff.

I often find that when I struggle with problems like this, it is because there is an underlying flaw in my OO design. Hope this helps!
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.

GeneralRe: How to force static instances of a class to initialize? Pin
PIEBALDconsult15-Apr-10 7:45
mvePIEBALDconsult15-Apr-10 7:45 
GeneralRe: How to force static instances of a class to initialize? Pin
Keith Barrow15-Apr-10 10:10
professionalKeith Barrow15-Apr-10 10:10 
GeneralRe: How to force static instances of a class to initialize? Pin
PIEBALDconsult15-Apr-10 10:22
mvePIEBALDconsult15-Apr-10 10:22 
AnswerRe: How to force static instances of a class to initialize? Pin
PIEBALDconsult15-Apr-10 5:27
mvePIEBALDconsult15-Apr-10 5:27 
GeneralRe: How to force static instances of a class to initialize? Pin
thugthug15-Apr-10 6:18
thugthug15-Apr-10 6:18 
GeneralRe: How to force static instances of a class to initialize? Pin
PIEBALDconsult15-Apr-10 7:42
mvePIEBALDconsult15-Apr-10 7:42 
AnswerRe: How to force static instances of a class to initialize? Pin
Luc Pattyn15-Apr-10 6:13
sitebuilderLuc Pattyn15-Apr-10 6:13 
GeneralRe: How to force static instances of a class to initialize? Pin
PIEBALDconsult15-Apr-10 7:41
mvePIEBALDconsult15-Apr-10 7:41 
GeneralRe: How to force static instances of a class to initialize? Pin
Luc Pattyn15-Apr-10 7:47
sitebuilderLuc Pattyn15-Apr-10 7:47 
GeneralRe: How to force static instances of a class to initialize? Pin
PIEBALDconsult15-Apr-10 7:56
mvePIEBALDconsult15-Apr-10 7:56 
AnswerRe: How to force static instances of a class to initialize? Pin
thugthug15-Apr-10 8:36
thugthug15-Apr-10 8:36 
GeneralRe: How to force static instances of a class to initialize? Pin
Luc Pattyn15-Apr-10 9:06
sitebuilderLuc Pattyn15-Apr-10 9:06 
GeneralRe: How to force static instances of a class to initialize? Pin
PIEBALDconsult15-Apr-10 9:40
mvePIEBALDconsult15-Apr-10 9:40 
GeneralRe: How to force static instances of a class to initialize? Pin
thugthug15-Apr-10 10:36
thugthug15-Apr-10 10:36 
GeneralRe: How to force static instances of a class to initialize? Pin
PIEBALDconsult15-Apr-10 11:41
mvePIEBALDconsult15-Apr-10 11:41 
AnswerRe: How to force static instances of a class to initialize? Pin
PIEBALDconsult15-Apr-10 12:05
mvePIEBALDconsult15-Apr-10 12:05 
GeneralRe: How to force static instances of a class to initialize? Pin
thugthug16-Apr-10 2:09
thugthug16-Apr-10 2:09 

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.