Geeks With Blogs
c pound I reject your reality and substitute my own!
Asymmetric Accessor Accessibility means you can do this: public string Name { get { return this.name; } protected set { this.name = value; } } Is that cool, or what! There a few caveats, so be sure to read the Language Spec page on this topic. ......

I can feel it. I was running the other day, The Distance playing in my ear-buds, and I caught a whiff of it. The scent of rain and plants and cold pavement and other things I can’t remember, a barbeque, maybe. The sun was shining, the clouds were awesome. I had clear road in front of me and nothing to do but run. I had to laugh – a bit maniacally, ......

Bloody useful, this code. Especially when threads or timers are involved. class Tracer { private Tracer() { } public static void WriteTracedDebugLine(string message) { StackTrace stack = new StackTrace(); string caller = stack.GetFrame(2).GetMethod... string callee = stack.GetFrame(1).GetMethod... if(message != null && message.Length ......

Anonymous methods are a great new feature in .Net 2. Another great new feature is the ParameterizedThreadStart delegate. Since the ParameterizedThreadStart delegate is just a delegate, these two concepts can be combined to effectively create an asynchronous anonymous method – an anonymous thread, if you will. You can spin off a chunk of code to ......

Previously, the discovery of what SQL servers exist on your network was quite a task. The general approach involved PInvoke. Yeah. Now, it .Net 2, it's a one-liner. Sweet! public List<SQLServer> GetServers(){ DataTable dt = SqlDataSourceEnumerator.Ins... List<SQLServer> servers = new List<SQLServer>(); foreach(DataRow ......

Joel likes to run off on little rants right in the middle of an article about whatever. Usually they're great. Sometimes they are dead on: “If you enjoy programming computers, count your blessings: you are in a very fortunate minority of people who can make a great living doing work they enjoy. Most people aren't so lucky. The very idea that you ......

The ListView control has a flicker issue. The problem appears to be that the control's Update overload is improperly implemented such that it acts like a Refresh. An Update should cause the control to redraw only its invalid regions whereas a Refresh redraws the control’s entire client area. So if you were to change, say, the background color ......

Easy but with a couple little catches. If you need to do this, I recommend reading the help on the various properties of ProcessStartInfo. This code runs a console window that is visible to the user. There is a way to run commands by cmd.exe without actually showing a window... and I'm sure you can figure that out if you're interested enough. This should ......

It’s been too long. I can’t believe it’s been over a month since I did a post here. Well, that’s not actually true. I’ve posted a few random photos from my phone. I’ll probably post a whole lot more of those because it’s such an interesting and fun medium. You don’t have to worry about image quality (it’s ......

Say you want to call a method on a control on your form from a thread... For example, you might want to populate a ListBox with a lot of data or with data from a really slow data source. In these cases you'll probably be using a seperate thread to get the data because it's generally a Bad Idea to block (freeze) your UI while you wait for all the data ......

So, what if you need to pop up a dialog box that could potentially abort the application before you pop up your main form? There are usually no good reasons to construct objects that you don't intend to use. That would include opening a Form which will immediately be closed. But is the following acceptable? I know it's possible... I'm doing it. But ......

So, I don’t really have anything to write about that wouldn’t be a rant about boredom, job satisfaction, ridiculous inefficiency, or one of the other states of the various affairs with which I am associated at this juncture. I wish I could post some cool code samples, but that would imply that I had actually written some interesting code ......

... and I'd probably be heading back today, if only my car wasn't in the shop


[Vista Express web-cam pic from this morning]



So... last week I got a new job, had a great day of snowboarding, finished the book I was reading, and saw a good movie with one of my roommates. What a great way to end the week ......

Copyright © Dan Koster | Powered by: GeeksWithBlogs.net | Join free