Browse by Tags

All Tags » C# » .NET 2.0 (RSS)

ITSWITCH #1: Answer

Last post I detailed some code that may or may not have something wrong in it.  If you thought InitializeOne and IntializeTwo are semantically identical (e.g. they differ only by performance), you'd be wrong. If you simply ran the code, you'd...

ITSWITCH: #1

A short pop quiz on design/coding in C#...

Formatting/parsing for a specific culture redux

In recent blog post I detailed how creating a culture via the CultureInfo constructor could actually create a user-overridden culture--which could be completely different than the culture that you've requested by name. Fortunately there's a way...

Using Exceptions For Normal Logic Flow

The generally accepted wisdom is that you shouldn't use Exceptions for normal logic flow. Normal logic flow is a bit subjective; but anything that must happen at least once in all known scenarios is normal logic flow. Enter XML Serialization in the...

Thread.Abort is a Sign of a Poorly Designed Program

Continuing the theme of Thead.Sleep is a sign of a poorly designed program , I've been meaning to provide similar detail on Thread.Abort and not just allude to it in other posts like 'System.Threading.Thread.Suspend() is obsolete: 'Thread...

Performance Implications of try/catch/finally, Part Two

In a previous blog entry Performance Implications of try/catch/finally I outlined that the conventional wisdom that there are no performance implications to try blocks unless an exception is thrown is false. I have some clarifications and details to add...

Performance Implications of try/catch/finally

The accepted wisdom regarding performance of try / catch | finally in C# has normally been: try has no performance side-effects unless an exception is thrown. A discussion I was involved in recently caused me to discover some performance implications...

Changing TextBox Text as an Undo-able Action

The TextBox class supports undoing the last action--inherited from TextBoxBase . Normally the user does this by pressing the undo key (Ctrl-Z if your keyboard doesn't have a specific Undo key) or by selecting "Undo" from the context menu. The last action...