The Artima Developer Community
Sponsored Link

.NET Buzz Forum
C# - What's wrong with this code? - #1

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Eric Gunnerson

Posts: 1006
Nickname: ericgu
Registered: Aug, 2003

Eric Gunnerson is a program manager on the Visual C# team
C# - What's wrong with this code? - #1 Posted: Nov 12, 2004 8:53 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Eric Gunnerson.
Original Post: C# - What's wrong with this code? - #1
Feed Title: Eric Gunnerson's C# Compendium
Feed URL: /msdnerror.htm?aspxerrorpath=/ericgu/Rss.aspx
Feed Description: Eric comments on C#, programming and dotnet in general, and the aerodynamic characteristics of the red-nosed flying squirrel of the Lesser Antilles
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Eric Gunnerson
Latest Posts From Eric Gunnerson's C# Compendium

Advertisement

Many months ago, I did a TechEd talk entitled "What's wrong with this code?". I've decided to re-target those snippets into blog posts. If you were at the talk, this may be boring, though I'll try to add a little anecdotal information in my answers.

Here's the plan:

  1. I post the snippet
  2. You comment on what's wrong with it
  3. I post my answer, and any comments that I like
  4. Repeat until I run out of snippetts.

Here's the snippet:

switch (s) {
   case "a":
      try {
         HitA();
      }
      catch (Exception e) {
         throw e;
      }
      break;
   case "b":
      try {
         HitB();
      }
      catch (Exception e) {
         throw e;
      }
      break;
}
 
What's wrong with this code?

Read: C# - What's wrong with this code? - #1

Topic: Using XML schemas effectively in WSDL design Previous Topic   Next Topic Topic: Reporting Services web part coming soon

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use