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) or raising an exception (x64 – a TargetInvocationException...
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 decided to encode their XML using the Windows-1255...
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, hiddenFlag2 and hiddenMethod /...
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 (MyType)); prop.AddValueChanged( this , this .OnMyDependencyPropertyChanged...
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 System.Threading.Timer can not handle it and lags...
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 Add a new server (for CodePlex, it's tfs01.codeplex...