in
tri
home of the trivadians

Nach Ordnungsbegriffen durchsuchen

  • C# Acrobatics : Lambdas and Expression Methods as a replacement for NVelocity

    I’ve been very quiet recently. (I’m trying to not be so loud, Scott. ) You see, I’ve been writing a lot of ASP.Net code for a site I’m working on. And, to be honest, I’ve been having a lot of trouble. The source code for .Net has been very helpful, and I’ve learnt...
    Erstellt in Richard's blog (Weblog) von Anonymous am 06-02-2008
  • Design Guidelines for LINQ

    Have you wondered if and when you should use the new LINQ features in .Net 3.5? Like, where should I put a new extension method? Should I use Func<T> or a custom delegate? How do I best implement a mix-in (extension methods on an interface)? Well, Mircea Trofin has just published a new draft...
    Erstellt in Richard's blog (Weblog) von Anonymous am 03-13-2008
  • ExtensionMethod.net - An Extension Methods Database

    While surfing around tonight, I came across ExtensionMethod.net, a database of useful Extension Methods for C# 3.0 and VB 9. I thought it might be useful, so I added a few of my own extension methods. IComparable<T>.LessThan int.Times int.To There aren’t many there yet, but there are one...
    Erstellt in Richard's blog (Weblog) von Anonymous am 03-03-2008
  • Remove and Sort Those Ugly “using-Statements”

    Visual Studio 2008 has lots of goodies in it, like LINQ syntax, CSS editing, and testing tools. There’s a lesser-known feature which I really appreciate though - the “Remove and Sort Usings” command in the C# editor. You activate the command by placing your cursor over the using statements...
    Erstellt in Richard's blog (Weblog) von Anonymous am 03-03-2008
  • 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
  • The LinqDataSource and the Hidden Viewstate

    Yesterday I thought I’d learn about the LinqDataSource in ASP.Net 3.5, and got an interesting surprise. The new LinqDataSource can also be used with a LINQ-to-SQL model to perform updates. You simply add the DataSource to your page, set the table name, and set EnableUpdate to true. Then, using...
    Erstellt in Richard's blog (Weblog) von Anonymous am 02-21-2008
  • Calculating the Fibonacci Sequence with C# 3.0

    Scott Hanselman just posted his latest article in his weekly source code series. He shows various ways of producing the Fibonacci Sequence using various languages. I found it really interesting, for two reasons: I tried to do the C#3.0 one on my own after listening to a podcast about F#, and never could...
    Erstellt in Richard's blog (Weblog) von Anonymous am 01-24-2008
  • Using LinqPad to Create a Time-Selector Drop-Down List

    I am really getting into LINQ now! I think it’s fantastic. I recently wanted to develop a quick drop-down list in ASP.Net which allows a user to select a time of day from a list. The times are 15 minutes apart, so the list would look like this: … 08:00 08:15 08:30 08:45 09:00 … …...
    Erstellt in Richard's blog (Weblog) von Anonymous am 01-18-2008
  • Using Lambda Expressions with LINQ to SQL

    When using LINQ, you need to be careful to use the right kind of Lambda expression. “What, there is more than one kind?”, I hear you gasp. There sure is! And if you aren’t careful, you’ll get a nice little message at runtime to tell you: “System.Object DynamicInvoke(System...
    Erstellt in Richard's blog (Weblog) von Anonymous am 01-16-2008
  • Inserting into a Table with LINQ to SQL

    While creating a little project, I wanted to know how to insert an object into a table using LINQ to SQL. Using Intellisense it wasn’t obvious at all. Scott Guthrie wrote a post on how do it. Unfortunately, the method name has changed since he did it, so you need to call InsertOnSubmit on the Table...
    Erstellt in Richard's blog (Weblog) von Anonymous am 01-15-2008
Seite 1 von 2 (11 Treffer) 1 2 > Weiter
/