Browse by Tags
All Tags »
How To (
RSS)
A couple of days ago I hit a regression bug in .NET 3.5 SP1, in which when you have a generic class that implements ISerializable and has static variables – you can not serialize it using a BinaryFormatter without your application either hanging (x86...
I recently wrote an engine that gets XML files stored at our clients’ servers using HTTP requests. One of our clients decided to serve the XML file with one encoding and encode the file itself with another. This posed a problem to XDocument. The client...
You can look up for prefixed members, using reflection, by placing an asterisk after the prefix: MemberInfo [] members = typeof ( A ).GetMember( "hidden*" , BindingFlags .NonPublic | BindingFlags .Instance); // members now contains three members: hiddenFlag1...
Sebastien Lambla wrote a cool post about how to correctly get notifications for the changes in dependency property values . In a nutshell: DependencyPropertyDescriptor prop = DependencyPropertyDescriptor.FromProperty( MyType.MyDependencyProperty, typeof...
Some of the work on my current project requires accurately timing events, at a frequency of a few dozen per second (that means that each event has to follow the previous one within a few milliseconds). The resolution of those calls is so small, that even...
Since I've started working with CodePlex, Team System failed to even remember my username whenever I started Visual Studio. After digging a bit, I found the answer. Start the Stored User Names and Passwords control panel: rundll32 keymgr.dll,KRShowKeyMgr...
Just a quickie that's been bothering me: The types MyType and MyType<T> are not the same type, as you might already know. Also, MyType<int> and MyType<string> are not of the same type. So, how do I find out if MyType<int> and MyType<string>...
Phil Haack 's words "Do not store user settings in an application configuration file!" reminded me of something I made a while back, in order to store user settings in an application. I used the Object Model Generator to create an object oriented representation...
A while back, I wrote about the Windows Forms Label not autosizing in the vertical sense as well as the horizontal sense. I added some code that would add that ability to the Label class. Today I received a comment from Chris Hockenberry telling me my...
Quite a while ago, I posted a way to debug into file references when you have the source code. At the time, we believed it to be the only way, even though it did not work at all times. However, I have found an easier way to do just that: While debugging...
More Posts
Next page »