Below are snippets for MovingParts.
5
MovingParts
so you executed a query that took .5 second to execute and you want to bind that to a windows control. next you decide that you will need to have two controls bound to the same datasource. not a problem, except when you do this:
control1.datasource = datatable
control2.datasource = datatable
you notice that each control mirrors the other and you cannot pick two seperate and distinct values.
one way to solve this is to create two datatables and execute the query twice. unfortunately this now doubles your query time. bad idea.
here is the elegant solution...
control1.datasource = datatable
control2.datasource = datatable
you notice that each control mirrors the other and you cannot pick two seperate and distinct values.
one way to solve this is to create two datatables and execute the query twice. unfortunately this now doubles your query time. bad idea.
here is the elegant solution...
5
MovingParts
One of best and unknown built in string function included in .NET is String.Split(). It has come in quite handy for my in the last 2 years that I thought I'd share. Pretty basic example here...and for my first post, I thought I'd throw in a little File IO (for free of course)! This was written in .NET 2.0 and it will take little to no modification to make it work in 1.0/1.1.









