Code Focused


Blazor: Working with Events

Blazor expert Chris Sainty provides hands-on code samples to explain how to handle DOM and user-defined events in Microsoft's experimental project for writing browser-based apps with C# instead of JavaScript.

How to Consume Web APIs in Blazor

Chris Sainty provides hands-on code samples on how to use Web APIs to interact with Blazor, an experimental framework from the ASP.NET team that allows developers to write C# and Razor code and have it run in the browser via WebAssembly.

How I Learned to Stop Worrying and Love Visual Studio Team Services

After suffering the consequences of accidentally turning off his firewall for a month and then experiencing a catastrophic workstation failure that took out both of his mirrored hard disks, Tim Patrick gained a new appreciation for online code repositories. He adopted VSTS and won't be looking back.

Replace a Running Application with a New Version

One situation that can prevent a successful file transfer is when the destination file is, in fact, the program that's doing the copying. Here's how to work around such problems.

OOP Code Focus: Clone a Derived Instance from a Base Object

OOP is a special kind of animal, says Tim Patrick, who shows how to put one of its core principles, encapsulation, to work while coding constructors for base and derived classes.

Storing Configuration Data in the Windows Registry Playground

Today, application settings are more likely to appear in local XML files, but the Windows Registry and its hives of key/value pairs can also be used. The good news is that interacting with the Registry is straightforward, as Tim shows you here.

Hide Compiler Warnings in Your Spare Time

Learn how to keep new code-style warnings from filling up your formerly pristine Visual Studio Error List panel.

Extracting Data with Regular Expressions

Regular expressions give Tim Patrick the creeps, but he overcame his fears by discovering specially crafted regex patterns can access data in a way that’s actually kind of cool.

Windows Forms: Don't Skimp on the Caps Lock Warning

If you've ever worked in an enterprise environment and fielded calls from employees unable to get into their accounts due to a depressed Caps Lock key, you know how essential the following tweak to your code can be.

Embellish Your Web API Responses with Header Data

Learn how providing information in available HTTP header elements can help make interactions between unrelated systems straightforward and meaningful.

Create Parameterized SQL Queries in ADO.NET

Squash the dangers lurking in your SQL queries by setting parameters by way of parameterized queries.

Safety in Numbers: Encoding URL Data in ASP.NET Web Page Projects

Let's go old school and use base-64 to (somewhat) safely package and pass around text and binary data.

C# Goes Back to BASICs with Local Functions

C# finally gets the BASIC GOSUB feature through local functions, but local functions take that GOSUB-like capability up a few notches.

The Fraternal Twins of Equals and GetHashCode

Lots of searching through lots of data means potential app performance degradation. Hash codes can speed things up.

Enforce Standards via EditorConfig Files

EditorConfig Files are new to Visual Studio 2017, and they're one way to get all the developers coding on the same page, so to speak. Here's a quick look.

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.

Upcoming Events