Unused class level variable...

mandelbrot

Well-known member
Joined
Jul 1, 2005
Messages
190
Location
UK North East
Dear All,


Could anyone tell me what the, apparently unused, designerPlaceholderDeclaration is used for, please? Microsoft seem to want us to leave it intact, but Ive tested code with it included and excluded, and it doesnt seem to make the slightest bit of difference...


Many thanks in advance
Paul.
 
Just venturing a guess, here, but judging by the name designerPlaceholderDeclaration, I would say that this is a place holder to support the designer. I dont know if there is any more signifigance to it, because I dont program with ASP.NET, but I would guess its just there to help the designer sort things out (which is why it woudnt make a difference if it is excluded in the end product).
 
Well doesnt that strike you as rather odd, however, bearing in mind that the Windows development side of things doesnt require a placeholder?...

Also, Ive tested the designer both with it and without it, and there seems to be no difference either way.
 
Like I said, it was a guess. Just curious, does the designer re-generate the placeholder when the file is re-opened?
 
It doesnt appear to regenerate, or rather, in my limited manipulations of the page through the designer, it doesnt appear to.

I did read something on MSDN explaining how to force FxCop to ignore the declaration, but cant find anything anywhere to explain exactly what it is used for.

Oh well, never mind - Ill try writing apps with and without it and see what happens...

Thanks for your help, Marble...
Paul.
 
Back
Top