Hi,
Normally my programming style is as follows:
/****************/
if ( SomeObject.CanYouDoThis() == true)
SomeObject.DoStuff();
else
MessageBox.Show("Nope, sowwy...");
/****************/
Meaning, most usually I don't just call "DoStuff()" and show the 'nope
sowwy' message if I caught an exception.
Now, the question is: can someone explain why the
PrincipalPermission's Demand method seems to work like this? MS
recommends to try the Demand() method before you do something secure,
and catch any exception to handle non-authenticated users. This seems
a bit like misusing exceptions?
Thanks.
-Jeroen