C#

Currently Browsing Category 'C#'

C# 6 Features: Expression Bodied Methods

by Joseph on Feb 4th in .Net, C#

Ok this is going to be a short one. We’ve seen how the Expression Bodied Auto Properties can simplify things a little bit. But, if that is possible, then what about other things with simple bodies? Turns out, Methods are fair game as well. This is turning in to a fairly popular language change. Again, it’s […]

C# 6 Features: Expression Bodied Auto-Properties

by Joseph on Feb 3rd in .Net, C#

Today I’d like to look at something interesting that moves us a little further with Auto-Properties. Expression Bodied Auto-Properties. This concept is pretty neat because it lets us take the idea of Auto-Initializing a property, and making it unsettable, and then gives us the ability to add on a lamba expression into the mix! The […]

C# 6 Features: Immutable Auto-Properties

by Joseph on Feb 2nd in .Net, C#

Now that we’ve seen how to create Auto-Property Initializers, let’s take a look at another new feature of Auto-Properties: Immutable Auto-Properties. For our use-case, I’d like to recall the PersonService class we created during the Simple Injection Example. In this example, we created a new person, then passed it to a service to save the new person to […]

C# 6 Features: AutoProperty Initializers

by Joseph on Feb 1st in .Net, C#

Last week, I started discussing the new C# 6 features introduced in Visual Studio 2015. The first entry discussed my personal favorite – String Interpolation. Today, I’d like to focus on Auto-Property Initializers. To get started, let’s take a look at our Person class that we’ve used a few times already. It’s pretty simple, and will be […]

C# 6 Features: CLR Version

by Joseph on Jan 30th in .Net, C#, Visual Studio

Continuing in our C# 6 Features Series… One of the neat things about C# 6 is that it is backwards compatible to previous versions of .Net. Language Versions are not identical to .Net Common Language Runtime (CLR) versions – which can produce a little bit of confusion. As of today (January 30, 2016), the current .Net CLR runtime […]

C# 6 Features: String Interpolation

by Joseph on Jan 29th in .Net, C#, Visual Studio

I had a few minutes, so I thought I’d get a series of posts started – really quick snippets about why C# 6 features are interesting, and why they matter. The one I’m going to start with is the one I’ve been using far and away the most. String Interpolation. Take a look at this: […]

Simple Injection Example

by Joseph on Jan 29th in .Net, Architecture, C#

Today I was asked an interesting question: how do I test a method which writes to a database, without writing to the database. My answer, of course: “Interfaces”! But… what if you don’t know HOW to do interfaces? My goal in this post is to explain Dependency Injection and Inversion of Control without actually using the words […]

Moving to Azure

by Joseph on Feb 27th in .Net, Azure, C#

I spent last weekend moving a client’s website from a traditional host into Azure Websites. I learned a few things, and made a few mistakes, but mostly it went fairly well. I thought I should share a little of my experience out here. What went well? The site moved directly from the traditional host to […]

Why should I upgrade from an Excel Workbook?

by Joseph on Oct 15th in .Net, C#, MS Office, SOA, SOA Benefits, Windows 8

An interesting question was posed to me earlier today. Why should I bother upgrading my Excel Spreadsheet application to a .Net Desktop application? Maybe the same question, or something similar has occured to you. Let’s see what we can come up with… A few things come to mind off the top of my head: What […]

Working with dynamic actions and Partial Views in the CODE Framework – Part 2

by Joseph on Jan 29th in .Net, C#, WPF, XAML

Last week, we discussed creating a Pizza Restaurant application with Partial Views and a Dynamic Action Collection. In this week’s blog post, we will look at setting up the View Models that enable the actual Action Collections. As things stand, the Pizza View looks something like this: One thing I did in the parent View Model (called […]

Powered By Wordpress Designed By Ridgey