From: MarkusSchaber on 23 Feb 2010 07:46 Hi, We currently have the problem that stylecop complains "All private fields must be placed after all public fields. [StyleCop Rule SA1202]". But the specific private static readonly field is used as an input in the initialization expressions for several public static readonly fields, so reversing the field order breaks initialization order of those static members. How should we deal with that? Thanks, Markus
From: Andrew Morton on 23 Feb 2010 09:39 MarkusSchaber wrote: > We currently have the problem that stylecop complains "All private > fields must be placed after all public fields. [StyleCop Rule > SA1202]". But the specific private static readonly field is used as an > input in the initialization expressions for several public static > readonly fields, so reversing the field order breaks initialization > order of those static members. > > How should we deal with that? Adjust the StyleCop rule? After all, it's mostly guidelines which are subject to change every now and again anyway. Andrew
From: Family Tree Mike on 23 Feb 2010 18:12 On 2/23/2010 7:46 AM, MarkusSchaber wrote: > Hi, > > We currently have the problem that stylecop complains "All private > fields must be placed after all public fields. [StyleCop Rule > SA1202]". But the specific private static readonly field is used as an > input in the initialization expressions for several public static > readonly fields, so reversing the field order breaks initialization > order of those static members. > > How should we deal with that? > > Thanks, > Markus Can't you initialize the constants in the static constructor? -- Mike
From: MarkusSchaber on 25 Feb 2010 06:11 Hi, On 24 Feb., 00:12, Family Tree Mike <FamilyTreeM...(a)ThisOldHouse.com> wrote: > On 2/23/2010 7:46 AM, MarkusSchaber wrote: > > Can't you initialize the constants in the static constructor? It seems that works, thanks! Markus
|
Pages: 1 Prev: GetTickCount API Next: Movable object along tracks using joystick: model railroad controllers? |