Wednesday, December 07, 2005 - Posts

Debug.Print or Debug.WriteLine

I took a recent example from Help and thought I could just use Debug.Print instead of Debug.WriteLine. Well I was wrong.

Debug.Print only takes either a string or a string format and some arguments, wheras WriteLine has loads more options, the one I needed just takes an object and calls the ToString() to output. You could call it lazy but why would you want to type ToString() just to get some debug info.

Debug.WriteLine for me.

 

Databinding in .Net Win Forms

I’m building a little app at the moment to leanr some winforms stuff. I have done this in the past and always found I wanted to display a list of my objects. It was always ok to get a static list but having the list hook into changes to the list was always something I didn’t want to spend the time looking into. CurrencyManagers and the like.

Well in revisting in .net 2.0 (some of this might have been in previous versions I just didnt find it), its really easy BindingList<of T> is the way to go. This blog post gives an over view of databinding and what works and doesn’t work when you bind to different list interfaces.

DC's .Net Client Blogs : BindingSource - A Closer Look...