Effective Writing guidelines from Scott Meyers

I try not to write posts that are simply links to other posts, but I had to make an exception for this.  I was quite

Read more >> Effective Writing guidelines from Scott Meyers

Reader Question: Member Initializers vs. Constructors

I received a very interesting question from a reader earlier this week:

I have a question for you about Item 12 in Effective C# (2nd

Read more >> Reader Question: Member Initializers vs. Constructors

SRT Solutions Trains LLamasoft Software Developers on C#

FOR IMMEDIATE RELEASE – MAY 30, 2012 – ANN ARBOR, MICH. — SRT Solutions, a software development, research and training company, recently began work with

Read more >> SRT Solutions Trains LLamasoft Software Developers on C#

Nested Using Statements: A Belt and Suspenders kind of thing

A friend sent me the following question last week: WIth the following code: using(StringReader sr = new StringReader(someXmlString)){ using (XmlReader reader = XmlReader.Create(sr)) { // Do Something. }}Is the second using statement really needed he…

Read more >> Nested Using Statements: A Belt and Suspenders kind of thing

Sometimes tools can be overly pedantic

I received a mail from a reader of Effective C# asking about a possible error in one of my samples.  He pointed out that my example for the Dispose pattern (Item 17) triggers an FX Cop (MS Code Analysis) warning: // Have its own disposed flag.priv…

Read more >> Sometimes tools can be overly pedantic

Write Contracts to minimize throwing exceptions

I received a great question that relates to using exceptions to indicate contract failures. I thought it would be of general interest, so I am sharing the answer and discussion here: I am reading your book More Effective C# and just finished Ch3, Item…

Read more >> Write Contracts to minimize throwing exceptions

Why no Finalizer example in Effective C# 2nd Edition?

I received this feedback on the Safari site about an earlier draft of the 2nd Edition of Effective C#: Text says: “You’ll notice that neither MyResourceHog nor DerivedResourceHog contain a finalizer. The example code I wrote does not directly cont…

Read more >> Why no Finalizer example in Effective C# 2nd Edition?

One Long Strange Trip: Visual Studio Magazine and Me

The January Visual Studio Magazine marks the first time the C# Corner is written by Patrick Steele. I’ve bowed out after a long run with the magazine and its predecessors. The most important part is that the C# column is in great hands. Patrick is e…

Read more >> One Long Strange Trip: Visual Studio Magazine and Me

Slides and Demos from my 2010 CodeMash talk

As promised, here are the slides and demos from my CodeMash Talk:  Going Dynamic in C#. Slides. Demos. Please note that the demos are compatible with VS2010 Beta 2. They will not load (or run) on VS2008. I believe they will be compatible with f…

Read more >> Slides and Demos from my 2010 CodeMash talk

Changed and rewritten items: Effective C# 2nd edition

In my last post, I wrote about the new items in the second edition of Effective C#, and those items that were removed to make room for the new items. Now, let’s discuss what happened to the items that I carried over from the previous edition. Every …

Read more >> Changed and rewritten items: Effective C# 2nd edition