Browse by Tags

Tagged Content List
  • Blog Post: What is the defining characteristic of a local variable?

    If you ask a dozen C# developers what a "local variable" is, you might get a dozen different answers. A common answer is of course that a local is "a storage location on the stack". But that is describing a local in terms of its implementation details; there is nothing in the C# language that requires...
  • Blog Post: Simple names are not so simple, Part Two, plus, volcanoes and fried foods

    I've returned from a brief vacation, visiting friends on the island of Maui. I'd never been to that part of the world before. Turns out, it's a small island in the middle of the Pacific Ocean, entirely made out of volcanoes. Weird! But delightful. The most impressive thing about the Hawaiian Islands...
  • Blog Post: Simple names are not so simple

    C# has many rules that are designed to prevent some common sources of bugs and encourage good programming practices. So many, in fact, that it is often quite confusing to sort out exactly which rule has been violated. I thought I might spend some time talking about what the different rules are. We'll...
  • Blog Post: Four switch oddities

    The C# switch statement is a bit weird. Today, four quick takes on things you probably didn't know about the switch statement. Case 1: You probably know that it is illegal to "fall through" from one switch section to another: switch(attitude) { case Attitude.HighAndMighty: Console.WriteLine...
  • Blog Post: What's The Difference, Part Two: Scope vs Declaration Space vs Lifetime

    "Scope" has got to be one of the most confusing words in all of programming language design. People seem to use it casually to mean whatever is convenient at the time; I most often see it confused with lifetime and declaration space . As in "the memory will be released when the variable goes out of scope...
Page 1 of 1 (5 items)