in
tri
home of the trivadians

Nach Ordnungsbegriffen durchsuchen

  • Refactoring C# Series: Aggregation of IEnumerable

    I was recently reading this book about the Ruby programming language, and came across this piece of example code: [1,3,5,7].inject(0) {|sum, element| sum+element} -> 16 [1,3,5,7].inject(1) {|product, element| product*element} -> 105 Inject is a method which acts on an array...
    Erstellt in Richard's blog (Weblog) von Anonymous am 03-02-2008
  • Writing Custom Exception Classes the Quick Way

    Until recently I thought this was a well-known feature. After demonstrating it a few times, I found out it wasn’t. A long time ago, in an cubicle far, far away, someone created the .Net Framework. To cut a long story short, they simultaneously produced guidelines for creating Exception classes...
    Erstellt in Richard's blog (Weblog) von Anonymous am 02-15-2008
  • Refactoring C# Series: Use Automatic Property

    Name Use Automatic Property Summary You have a property in a class which just wraps a field of the same type, and simply returns or sets that field. private string _field1; public string Field1 { get { return _field1; } set { _field1 = value; } } Becomes: public string Field1 { get; set; } C# Version...
    Erstellt in Richard's blog (Weblog) von Anonymous am 12-27-2007
  • New series: Refactoring C# 1.0 code to C# 3.0

    I really like Scott Hanselmann’s idea to write an indefinite series of posts about reading code to be a better developer. I’m going to copy his idea, and write a series of my own. Since its first version, C# has evolved from being a Java clone to something much more dynamic. I’ve noticed...
    Erstellt in Richard's blog (Weblog) von Anonymous am 12-25-2007
Seite 1 von 1 (4 Treffer)
/