W
WineNCheese
I'm just venting.
I finally got around to converting a big WinForms app for my biggest client
to .NET 2.0. I've heard all along that application settings are now
writable, which has always been one of many bones of contention with .NET
1.1 for me. So I get to the point where I am going to convert my custom
settings mechanism, do a little investigation, and find out the reason I
made a custom configuration file mechanism hasn't changed at all. Sure -
you can write user setttings, and settings are type safe now, but the
application scope settings are still read-only. (If anybody knows a
reasonable workaround that works within the framework for this, I'd like to
hear it). I certainly understand MS's reasoning for making them read-only,
but I'm more of the mind that in "most cases" the application settings
shouldn't/wont need to be written. However, to prevent it altogether is
simply stupid, imho. I feel like I'm old enough to be responsible for my
own actions by now.
I do like the new stuff for user settings and for application settings that
don't change, so I'm actually going to use the new stuff for all of that.
However, I have one setting that all users must be able to change, and must
be the same for all users. I had a custom configuration file, and I allowed
write access to its containing folder on installation. I may move this
value to the database for now. Or, Gawd Forbid, the Registry!
Don't get me started on generic collections! Ok, I'll start, but just
barely... Ha! Have you seen the Find() or Exists() method on List? Here's
the code to find '6' in a list of ints:
List<int> myInts = new List<int>();
myInts.Add( 0 );
myInts.Add( 1 );
myInts.Add( 2 );
myInts.Add( 3 );
int n = myInts.Find( delegate(int x) { x==6; } ); // seems rather obtuse
to Find(6), doesn't it? This returns '0'! Ha!
int m = myInts.Find( delegate(int x) { x==0; } ); // This returns '0' too!
I tried deriving my own collection, and quickly found that two values of
type T cannot be compared. I'm sure there's a good reason for this - I just
hope there's a better workaround eventually. It makes me wish for the days
#define!
Even though that's just the tip of the tip of the iceberg of my complaints,
I still like it (2.0 that is). It's definitely a step in the right
direction.
I finally got around to converting a big WinForms app for my biggest client
to .NET 2.0. I've heard all along that application settings are now
writable, which has always been one of many bones of contention with .NET
1.1 for me. So I get to the point where I am going to convert my custom
settings mechanism, do a little investigation, and find out the reason I
made a custom configuration file mechanism hasn't changed at all. Sure -
you can write user setttings, and settings are type safe now, but the
application scope settings are still read-only. (If anybody knows a
reasonable workaround that works within the framework for this, I'd like to
hear it). I certainly understand MS's reasoning for making them read-only,
but I'm more of the mind that in "most cases" the application settings
shouldn't/wont need to be written. However, to prevent it altogether is
simply stupid, imho. I feel like I'm old enough to be responsible for my
own actions by now.
I do like the new stuff for user settings and for application settings that
don't change, so I'm actually going to use the new stuff for all of that.
However, I have one setting that all users must be able to change, and must
be the same for all users. I had a custom configuration file, and I allowed
write access to its containing folder on installation. I may move this
value to the database for now. Or, Gawd Forbid, the Registry!
Don't get me started on generic collections! Ok, I'll start, but just
barely... Ha! Have you seen the Find() or Exists() method on List? Here's
the code to find '6' in a list of ints:
List<int> myInts = new List<int>();
myInts.Add( 0 );
myInts.Add( 1 );
myInts.Add( 2 );
myInts.Add( 3 );
int n = myInts.Find( delegate(int x) { x==6; } ); // seems rather obtuse
to Find(6), doesn't it? This returns '0'! Ha!
int m = myInts.Find( delegate(int x) { x==0; } ); // This returns '0' too!
I tried deriving my own collection, and quickly found that two values of
type T cannot be compared. I'm sure there's a good reason for this - I just
hope there's a better workaround eventually. It makes me wish for the days
#define!
Even though that's just the tip of the tip of the iceberg of my complaints,
I still like it (2.0 that is). It's definitely a step in the right
direction.