CSharpFeeds - All your C# feeds in one place.

Tuesday, July 27, 2010

Sponsor

Iterate, damn you!

by skeet via Jon Skeet: Coding Blog on 7/27/2010 6:52:23 PM

Do you know the hardest thing about presenting code with surprising results? It's hard to do so without effectively inviting readers to look for the trick. Not that that's always enough - I failed the last of Neal and Eric's C# puzzlers at NDC, for example. (If you haven't already watched the video, please do so now. It's far more entertaining than this blog post.) Anyway, this one may be obvious to some of you, but there are some interesting aspects even when you've got ...

[ read more ]

Introducing ASP.NET MVC 3 (Preview 1)

by ScottGu via ScottGu's Blog on 7/27/2010 4:06:23 PM

This morning we posted the “Preview 1” release of ASP.NET MVC 3.  You can download it here. We’ve used an iterative development approach from the very beginning of the ASP.NET MVC project, and deliver regular preview drops throughout the development cycle.  Our goal with early preview releases like the one today is to get feedback – both on what you like/dislike, and what you find missing/incomplete.  This feedback is super valuable – and ultimately makes the final product m ...

[ read more ]

Monday, July 26, 2010

Graph Colouring, Part Four

by Eric Lippert via Fabulous Adventures In Coding on 7/26/2010 3:20:00 PM

Let's give it a try. Can we colour South America with only four colours? Let's start by stating what all the edges are in the graph of South America: const int Brazil = 0;const int FrenchGuiana = 1;const int Suriname = 2;const int Guyana = 3; const int Venezuala = 4;const int Colombia = 5;const int Ecuador = 6;const int Peru = 7;const int Chile = 8;const int Bolivia = 9;const int Paraguay = 10;const int Uruguay = 11;const int Argentina = 12;var SA = new Dictionary<int, int[]>(){ &nb ...

[ read more ]

Sunday, July 25, 2010

Degrees of reality in sample code

by skeet via Jon Skeet: Coding Blog on 7/25/2010 8:58:03 PM

Yesterday I tweeted a link to an article about overloading that I'd just finished. In that article, all my examples look a bit like this: using System; class Test {     static void Foo(int x, int y = 5)     {         Console.WriteLine("Foo(int x, int y = 5)");     }          static void Foo(double x)     { ...

[ read more ]

Saturday, July 24, 2010

FakeItEasy Login Service Example Series – Part 7

by Patrik Hägne via On Development on 7/24/2010 11:18:00 AM

This is the seventh and last part in the series of posts where I’m porting Brett Schucherts excelent demo of Mockito in Java to C# and FakeItEasy. The source for this example series can be found in a Mercurial repository at Google code. Each test implementation and following code update is a separate commit so you can easily update your repository to look at the full code at any given state. Find the repository here. Part 1 can be found here. Part 2 can be found here. Part 3 can be found her ...

[ read more ]

Friday, July 23, 2010

Entity Framework 4 “Code-First” - Custom Database Schema Mapping

by ScottGu via ScottGu's Blog on 7/23/2010 8:09:00 AM

Last week I blogged about the new Entity Framework 4 “code first” development option.  The EF “code-first” option enables a pretty sweet code-centric development workflow for working with data.  It enables you to: Develop without ever having to open a designer or define an XML mapping file Define model objects by simply writing “plain old classes” with no base classes required Use a “convention over configuration” approach that enables database persistence withou ...

[ read more ]

Thursday, July 22, 2010

Graph Colouring with Simple Backtracking, Part Three

by Eric Lippert via Fabulous Adventures In Coding on 7/22/2010 1:54:00 PM

OK, we've got our basic data structures in place. Graph colouring is a very well-studied problem. It's known to be NP-complete for arbitrary graphs, so (assuming that P!=NP) we're not going to find an always-fast algorithm for colouring an arbitrary graph. However, for typical graphs that we encounter in the wild, the following simple algorithm is pretty good. Start by saying that every node can be every possible colour. Then: 1) Do you have a single possible colouring for every node in t ...

[ read more ]

Wednesday, July 21, 2010

Back to the basics: more on casting

by luisabreu via LA.NET [EN] on 7/21/2010 1:54:01 PM

I’ve already mentioned casting several times before, but I guess I’ve jumped over several basic features associated with that operation. Since this is a basics series, I should have probably explained casting instead of assuming that everyone knows how it works. So, I’ll go back and use this post to present some features associated with casting in C#. By default, the CLR allow us to cast an object to its type or to any of its base types. If you’re using C#, then you don’t need to do anything to ...

[ read more ]

Monday, July 19, 2010

Back to the basics: conversion operators

by luisabreu via LA.NET [EN] on 7/19/2010 2:18:00 PM

[Update: small update to the implicit operators code. Thanks Kevin] In a previous post, I’ve mentioned conversion operators. But what is a conversion operator? In the past, I bet that we’ve all needed to convert from one type of object to another. When we’re talking about primitive types, the CLR knows how to perform the conversion (of course, when that is possible). However, when we’re not talking about primitive types, the CLR is only able to perform the conversion if t ...

[ read more ]

Friday, July 16, 2010

Code-First Development with Entity Framework 4

by ScottGu via ScottGu's Blog on 7/16/2010 11:35:12 AM

.NET 4 ships with a much improved version of Entity Framework (EF) – a data access library that lives in the System.Data.Entity namespace. When Entity Framework was first introduced with .NET 3.5 SP1, developers provided a lot of feedback on things they thought were incomplete with that first release.  The SQL team did a good job of listening to this feedback, and really focused the EF that ships with .NET 4 on addressing it.  Some of the big improvements in EF4 include: ...

[ read more ]

Subscribe

New Feed

Product Spotlight

Recently Updated Sources

Legal Note

The content of the postings is owned by the respective author. CSharpFeeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on CSharpFeeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.

Advertise with us