BROWSE: Most Recent | Popular Tags |

Tags > dotnet

Functions are values: explore C# lambda types in Visual Studio

By Andrew Stellman
April 9, 2011

I love that a college professor of mine from long ago, Bob Harper, is tackling the tricky issue of how to teach students about the nature of functions in his new Existential Type blog. His post got me thinking about how you'd go about teaching this concept to a learner—specifically, in my case, a C# learner. I've given it a bit of thought, and here's what I've come up with.

Understanding C#: Nullable Types

By Andrew Stellman
November 7, 2010

Every C# developer knows how to work with value types like int, double, boolean, char, and DateTime. They're really useful, but they have one flaw: they can't be set to null. Luckily, C# and .NET give you a very useful tool to for this: nullable types. You can use a nullable type any place that you need a variable that can either have a value or be null. This seems like a simple thing, but it turns out to be a highly flexible tool that can help make your programs more robust. In this tutorial, I'll show you the basics of nullable types, and give you a quick example of a program that uses them to handle unpredictable user input.

Understanding C#: Simple LINQ to XML examples (tutorial)

By Andrew Stellman
October 16, 2010

XML is one of the most popular formats for files and data streams that need to represent complex data. The .NET Framework gives you some really powerful tools for creating, loading, and saving XML files. And once you've got your hands on XML data, you can use LINQ to query anything from data that you created to an RSS feed. In this post, I'll show you two simple LINQ to XML tutorial style examples that highlight basic patterns that you can use to create or query XML data using LINQ to XML.

1 to 3 of 3
The Watering Hole