Category Archives: C#

What It Is, How To Use It, and More How do you put a list of objects on a WPF form dynamically so that if you add or remove an entry, the controls for it are added or removed? In this installment of the WPF Controls mini-series, we are going to look at one possible solution, which is to use the ItemsControl. This is one of those controls that is actually rather easy to use but is, at the same time, also confusing to a lot of people. Let’s clear up that confusion. ﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿ Resources mentioned in the video Patreon…

Cascading dropdowns, binding, and more Designing WPF controls, especially with MVVM, can be tricky so I decided to create a mini-series on the various controls we have access to in WPF and how you can wire them up properly. Even if a video covers a control you are familiar with, you will probably see an advanced use case or two that will be of benefit. In this first video, we are going to cover the combo box including how to get the data about the selected item and how to cascade dropdowns. ﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿ Resources mentioned in the video Patreon Signup…

Examples, Best Practices, Memory Management, and Pitfalls It seems like everything has an API these days but have you ever wondered how to make use of an API in your application? It turns out that it isn’t really that hard at all. In this video, I am going to show you how to easily load the data from two different APIs into an application. Along the way I will show you how to avoid some memory issues and other best practices around talking to APIs ﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿ Resources mentioned in the video Patreon Signup for behind-the-scenes access: https://www.patreon.com/IAmTimCorey Sign up for…

Deploy to Azure or IIS in Minutes Deploying a website used to be tricky. Now with all of the built in help, deploying your ASP.NET website to a local web server or the cloud can be done in minutes. Today, I am going to show you the options you have for deploying a full .NET website. We will cover deploying to a local or remote IIS server as well as Window Azure. Since .NET Core is a bit different, I will be covering the deployment options for it in a separate video. Not to worry though, the techniques in this…

Speed Up Development Without Increasing Your Costs Visual Studio is much more than just a text editor. There is a ton of power built into the platform. Before you go out and spend a lot of money on 3rd party tools, you should get to know what is already available to you in Visual Studio. That is why in this video, I am going to show you ten of my favorite features to make your development faster and easier. ﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿ Resources mentioned in the video Patreon Signup for behind-the-scenes access: https://www.patreon.com/IAmTimCorey Sign up for my mailing list here: https://iamtimcorey.com/general-sign-up Initial…

Contributing to Open Source the Easy Way It’s not what you know, it’s who you know. Ever heard that? Well, whether that is fully true or not, it definitely doesn’t hurt to become known in the community you want to work in. In this video I am going to show you a really easy way to help the community out in a way that will also gain you a bit of reputation. No I’m not talking about gaining StackOverflow or CodeProject reputation, even though those are both great options. In this video I am going to show you how to…

What They Are, How to Use Them, and Best Practices I get asked about abstract classes a lot. What they are, how they work, and why you should know about them. An easy way to think of an abstract class is to say that it fits between a full base class and an interface. Basically it is a blend of the two. In this video, I am going to demonstrate what an abstract class is, how to use it, and when it makes sense to create an abstract class. ﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿ Resources mentioned in the video Patreon Signup for behind-the-scenes access:…

How To Safely Test Data Access Code and More Unit tests are great, but how do you test your data access? You sure don’t want to actually delete records when you are testing the delete method, yet you definitely want to be sure the method is configured properly. This is the type of problem that stops a lot of developers from creating unit tests. In this video, I am going to show you how to overcome these obstacles in order to write tests that handle working with external dependencies like databases. ﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿ Resources mentioned in the video Patreon Signup for…

The What, How, and Why Dependency Injection in C# can be a really confusing topic. Yet, when done right, Dependency Injection can be one of the best things you do for your application. It allows you to disconnect pieces of your application from each other easily and it allows you to test the various parts of your application independently. Today, I am going to get you started using Dependency Injection using a free tool called Autofac. We will take a small sample application and first apply the Dependency Inversion Principle (the D in SOLID). Then, we will wire up Autofac…

The What, How, and Why An access modifier in C# specifies who can see and use a resource. You probably are familiar with public and private. We use those a lot but did you know that there are others? In this video, I am going to cover six different access modifiers and when you would use each. We are also going to discuss why we have various modifiers and it isn’t just about security. ﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿ Resources mentioned in the video Patreon Signup for behind-the-scenes access: https://www.patreon.com/IAmTimCorey Sign up for my mailing list here: https://iamtimcorey.com/general-sign-up Initial Source Code from the video: …