Hi Pete,
Thanks for the response.
Not sure what you mean by "visible in the VS Intellisense". Intellisense
is an editor-related feature, not a run-time debugger feature.
Maybe I'm getting mixed up. I mean when you're debugging, you hit the
breakpoint, you run your mouse over a variable, a little window pops up and
shows the variable type, by clicking the little expand box next to the
variable type you can see data about the varaible. Its nearly exactly the
same functionality you get in the "Watch" window. I mean that when I say
"Intellisense", sorry for the confusion. In that window, when I scroll down
to the Font property, that "Watch"-style window shows an exception,
"NotSupportedException".
Yeah, but AFAIK none of the rest of us do any .NET work on CF. I'll bet
this is a straight newbie question on a forum specifically for CF. But
here, all you get is us dummies scratching our heads, because everything
works fine on the desktop.
Fair point. The differences between .NET 2.0 and .NET CF 2.0 are not
massive, though. Usually the MSDN documentation online or the VS inline help
make it quite clear when a feature is supported or not supported in the CF.
Sometimes, as with the Font property of the Panel control, the documentation
is not quite right.
If you find the docs confusing, submit feedback to Microsoft. There's a
ton of documentation on MSDN, most of it for legacy versions, and you can
bet Microsoft isn't sifting through it looking for problems. They will
only know if you tell them.
Thanks, good suggestion. I've gone back online and made the suggestion for
documentation improvements both on the Panel and the Font documentation for
..NET 2.0.
Rather than hard-coding specific types in your code, why not just catch
the
exception:
Thats what I was doing before, but I'm currently going through a sweep
through the code logging whenever an exception occurs (with the aim to try
and remove as many if not all exceptions). After adding this log, I
discovered the repeated crash on the Panel (and other controls). Maybe I'm
old school, but I find this new trend towards writing code that merrily
crashes (which involves putting try/catch blocks everywhere) sloppy. I mean
the previous developer was putting try/catch clocks around *everything*
including really silly things like: label1.Text = "A string"; !! Its a bit
like telling the developer to buy more memory or a faster PC instead of
focussing efforts on performance. By just taking his code and checking how
often it crashed, it was crashing into the except block up to 20-30 times a
minute by jumping around the screens.
Perhaps you have an opinion on that matter. In my opinion, writing code that
doesn't crash is both easier to read, smaller and, I would have thought,
gets better performance.
Thanks again,
Alain