|
God Hates Penguins, But He Loves Threading and Delegates!
On this .NET Preacher Show, we start off with a public service announcement to help save your soul from the dangers of penguin loving and the eternal fires of damnation! Notice the prominent Satanic Pentagram on the penguin's chest in this episodes graphic! A sure fire sign that he's in league with Satan! (We'll have more on the Devil in a future episode...) We then get a bit more serious with some some .NET news, a quick introduction to DotNetNuke for those that have been hiding for the last few years—or consorting with penguins—and then head off to explore a sample application. The sample application this time around demonstrates how to pass a custom object to a threadpool and notify your main application of the status of what's going on in the thread. Code snippits to pay attention to in the sample application are: 1:// How we start the thread... 2:bool b = ThreadPool.QueueUserWorkItem(new WaitCallback(doStuff.RunProcess), obj); 3:// How we call back to the delegate method in the main application 4:m_sender.BeginInvoke(m_senderDelegate, new object[] { reversed, false }); We go over them and how they releate to other things in the show. Those that are less familiar with delgates may wish to print out the code to look at while they're listening to the show. The sample application is extremely simple with no mucky extras to confuse you. It's also extensively commented and includes step-by-step instructions on how to follow through on your own without the podcast. Of course you'd miss out on all the other goodies in the podcast if you didn't listen to it, and God just might mistake you for a PENGUIN LOVER! So... If you know what's good for your eternal soul, you'll download this episode of the Dot Net Preacher Show and get it on your iPod... Errr... I mean Zune! Yeah! On your Zune to listen to! (No heretics here by George! You can send the Spanish Inquisition back home!) Make sure to tune in next time for an interview with Grant Frisken from Infralution. Cheers, The Dot Net Preacher Intro & Outro Music: God Hates Penguins By: 1) BJam and 2) Big Mountain Fudge Cake You can find BJam here and Big Mountain Fudge Cake here.
|