> It seems I can't look at the Properties.Settings.Default.xxxx value in
> the immediate window while I'm in debug mode. If I try, I get the
> message: "'System.Windows.Forms.PropertyStore' does not contain a
> definition for 'Settings'"
Sounds like a namespace issue. The actual application
Properties.Settings.Default.xxxx values are not in
System.Windows.Forms.PropertyStore, so you can see from the error that
the immediate window is trying to use a different Properties than the
one you need.
The Settings class in which the values exist is actually in Properties
namespace within your own application's namespace.
So, if your program's namespace is MyProgram, you should be able to show
the settings via MyProgram.Properties.Settings.Default.xxxx (where xxxx
is whatever setting you're looking for, of course).
Pete
Dom - 24 Aug 2007 21:49 GMT
> > It seems I can't look at the Properties.Settings.Default.xxxx value in
> > the immediate window while I'm in debug mode. If I try, I get the
[quoted text clipped - 15 lines]
>
> Pete
That did it. Thanks. Any idea why the immediate window is using the
wrong ns?
Peter Duniho - 24 Aug 2007 22:57 GMT
> That did it. Thanks. Any idea why the immediate window is using the
> wrong ns?
Nope. Sorry. I will agree with Ignacio that I doubt this is a
consequence of your moving things into a separate folder, though I can't
rule it out. Doing that does, as you noticed, change the default
namespace for new things, but I don't see why it'd affect how the
immediate window chooses namespaces.
I have precious little experience using the immediate window though, so
I don't have anything useful to offer with respect to why it does what
it does. Sorry.
Pete
Dom - 24 Aug 2007 21:56 GMT
> > It seems I can't look at the Properties.Settings.Default.xxxx value in
> > the immediate window while I'm in debug mode. If I try, I get the
[quoted text clipped - 15 lines]
>
> Pete
I wander if I screwed things up here. I have several classes that
serve a similar purpose. All of them are in the name space,
"MyProgram". Then later, just to fool around with the IDE, I decided
to create a folder, "Items", in the Solution Explorer, and move all
the classes to that folder, since they do similar work. If I create a
new class within the folder, the namespace comes up as
"MyProgram.Items". The other classes, of course, do not have this NS.
Is that a bad policy?
Dom
Ignacio Machin ( .NET/ C# MVP ) - 24 Aug 2007 22:06 GMT
Hi,
>> > It seems I can't look at the Properties.Settings.Default.xxxx value in
>> > the immediate window while I'm in debug mode. If I try, I get the
[quoted text clipped - 25 lines]
>
> Is that a bad policy?
Moving classes to folders?
Of course no.
The IDE by default create a new sub namespace per each folder that you add,
sometimes you want it, sometimes you don't. You can simply edit the source
code and remove the sub namespace. I do not recall if this is a config
option in the IDE though.
I think your question would be better suited to a different group,
try:
http://groups.google.com/group/DotNetDevelopment?hl=en
Peter Duniho - 24 Aug 2007 22:55 GMT
> I think your question would be better suited to a different group,
> try: [snip]
In what way is that non-Microsoft-supported, non-Usenet, web-only forum
better than this newsgroup?
And if it is, shouldn't you just post a similar reply to every single
post in this newsgroup?