DCSIMG
How To - עומר.נט

Browse by Tags

All Tags » How To (RSS)

Circumventing the KB957543 .NET 3.5 SP1 Regression Bug

Posted Jan 29 2009, 06:23 PM by עומר ון קלוטן  

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...

Your Mouth Says Windows-1255, But Your Eyes Say ISO-8859-1

Posted Dec 18 2008, 06:45 PM by עומר ון קלוטן  

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...
תגים:

Did You Know? Type Member Lookup by Prefix

Posted Dec 16 2007, 08:51 AM by עומר ון קלוטן  

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 /...
תגים:

Registering to a DependencyProperty's Change Event

Posted Sep 18 2007, 08:19 AM by עומר ון קלוטן  

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...
תגים:,

How To Create a Really Accurate Timer

Posted May 08 2007, 09:01 AM by עומר ון קלוטן  

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...
תגים:

Save User Details For Team Explorer

Posted Jan 21 2007, 08:55 AM by עומר ון קלוטן  

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...