Scott Dorman

ephemeral segment

  Home  |   Contact  |   Syndication    |   Login
  599 Posts | 10 Stories | 848 Comments | 51 Trackbacks

News


Post Categories

Image Galleries


Microsoft Store


Creative Commons License



Locations of visitors to this page

Subscribers to this feed

TwitterCounter for @sdorman

View blog authority

Add to Technorati Favorites

Windows Live Alerts

AddThis Social Bookmark Button

LinkedIn profile

Community Credit profile

The Code Project

Follow me on Twitter

Get Free Shots from Snap.com

Community Credit Hall of Fame

Get Feedghost

Xobni outlook add-in for your inbox



Support This Site

Tag Cloud


Article Categories

Archives

Post Categories

Image Galleries

.NET (General)

General .NET 2.0 related topics.

Regular readers may have noticed that my blogging activity has slowed down considerably. I’m hoping to pick back up and start posting more soon, but until then I wanted to make sure everyone knows that I am still active…there have been other things that have been consuming my time. First, my Sams Teach Yourself Visual C# 2010 in 24 Hours book came out, officially on the shelves in August although content was complete in late February. Shortly after the book came out, I started working on an article...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Code camps are a great resource for the local development community. They provide developers and speakers (who are almost always local developers as well) a way to interact and learn about topics they otherwise might not have an opportunity. As a speaker, it is always great to see new people in my talks and answer questions since in almost every talk, someone asks a question I haven’t heard before. One of the things that most speakers, including myself, like getting is feedback. We want to know what...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

As most of you know, I do a lot of presentations each year, mostly at local code camps. As a speaker, it is always great to see new people in my talks and answer questions since in almost every talk, someone asks a question I haven’t heard before. One of the things that most speakers, including myself, like getting is feedback. We want to know what you thought of the presentation, both the material and the delivery. It used to be that most code camps passed out evaluation forms to provide this feedback....
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

There have been several questions on StackOverflow about how to determine if a type is defined in the .NET Framework or is a third-party or custom type. Based on the answers provided to these questions, this can be accomplished using some reflection to retrieve the public key token of the assembly in which the type is defined and compare it to a public key token known to be used by Microsoft to sign the .NET Framework assemblies. Update: Based on some additional research and a Twitter conversation...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Last September while I was working on my Teach Yourself Visual C# 2010 in 24 Hours book for Sams Publishing, I posted some interesting statistics for the .NET Framework 3.5 SP1. Now that the .NET Framework 4.0 has been released, I thought I would update these statistics (and thanks to Lisa for asking about them). There were a total of 44,346 types (loaded from 130 assemblies), with 33,152 classes, 2,398 interfaces, 4,828 enums, and 8,796 value types. The complete breakdown is shown below. Of the...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

With the release of the Visual Studio Pro Power Tools (and many other new extensions having been released), my list of favorite Visual Studio extensions has changed. All of these extensions are available in the Visual Studio Gallery. Here is the list of extensions that I currently have installed and find useful: Bing Start Page CodeCompare Collapse Selection In Solution Explorer Collapse Solution Color Picker Completion Extension Analyzer Find Results Highlighter Find Results Tweak (Available from...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

[This is actually a response to Bill’s blog post, but since it isn’t possible to leave this as a comment on his blog it’s a post here.] There are many different ways to implement the Dispose pattern correctly. Some are (in my opinion) better than others. In Bill’s blog post he presents a particular pattern, which is an excerpt from his book (Effective C#). The issue centers around the fact that a reader took the code sample presented in the book and ran FxCop (Code Analysis) on it, which generated...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

The .NET Framework allows you to easily add metadata to your classes by using attributes. These attributes can be ones that the .NET Framework already provides, of which there are over 300, or you can create your own. Using reflection, the ways to retrieve the custom attributes of a type are: System.Reflection.MemberInfo public abstract object[] GetCustomAttributes(bool inherit); public abstract object[] GetCustomAttributes(Type attributeType, bool inherit); public abstract bool IsDefined(Type attributeType,...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Corrupted state exceptions are designed to help you have fewer bugs in your code by making it harder to make common mistakes around exception handling. A very common pattern is code like this: public void FileSave(String name) { try { FileStream fs = new FileStream(name, FileMode.Create); } catch (Exception e) { MessageBox.Show("File Open Error"); throw new Exception(IOException); } The standard recommendation is not to catch System.Exception but rather catch the more specific exceptions (in this...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

I have previously talked about Microsoft StyleCop. For those that might not know about it, StyleCop is a source analysis tool (different from the static analysis that FxCop performs) that analyzes the source code directly. As a result, it focuses on more design (or style) issues such as layout, readability and documentation. In an interesting move (and one that I am happy to see), Microsoft has decided to make StyleCop an open source project (under the MS-PL license) available on CodePlex. (The project...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Full .NET (General) Archive