Take the 2-minute tour ×  In every background audio sample I
have found for Windows Phone 7.5/8, I see the following
construct, and I would like to know why:  private static bool
_classInitialized;  public BackgroundAudioAgent()     if
(!_classInitialized)         _classInitialized = true;
// Other static initialization  This is a really bizarre way to
do static initialization - why not use a static constructor?
I've experimented with using static constructors, and they seem
to work without issue, as you would expect.  Despite the
apparent uselessness of this style of code, I hesitate to
dismiss something that comes from the authors of the audio API.
Is there a reason not to use static constructors in background
agents?  share|improve this question Kind of looks like they're
trying to obtain the same behaviour as a singleton class?
Doesn't make much sense otherwise. –  easuter Jul 19 at 9:15 add
comment   Your Answer    Browse other questions tagged or ask
your own question.