Tag: .Net

Securing Web APIs in .NET Core 2.2

Microsoft will simplify Web API authentication in a soon-to-be-released update! UPDATE: Michael Stokesbarry spoke at the Spokane .NET Users Group about the now released update. Click here for the video. This week’s release of ASP.NET 2.2 gave us some performance enhancements, ability to do health checks on the application and code analyzers to help you […]

Timers Prior to Async/Await Pattern of C# 5.0

There are multiple ways to use Task.Delay() when a timer is required. For scenarios prior to .NET 4.5, several timer classes are available, including System.Windows.Forms.Timer, System.Timers.Timer, and System.Threading.Timer. The development team designed System.Windows.Forms.Timer specifically for use within a rich client user interface. Programmers can drag it onto a form as a nonvisual control and regulate […]

Getting started with Model-View-ViewModel (MVVM) pattern using Windows Presentation Framework (WPF)

The Windows Presentation Framework (WPF) is built to take full advantage of the Model-View-ViewModel (MVVM) pattern. Though it is possible to create WPF applications without using the MVVM pattern, a little investment in learning can make building WPF applications much simpler. If you are just getting started with WPF I would suggest taking a look […]

Error: “Predefined type ‘System.ValueTuple’ is not defined or imported”

As soon as you start programming tuples in C# 7.0, you are likely to encounter the compiler error, “Predefined type ‘System.ValueTuple’ is not defined or imported.”   This issue is easily corrected. When encountered, the error will look like this on the code editor: The issue is that the C# 7.0 compiler is trying to […]

Locking a Block of Code With an Integer

I was talking with a developer recently who was convinced that you could use a static integer variable to lock a block of code merely by casting it to an object, like this

First it must be noted that an integer cannot be used by itself in a lock statement because it is a […]

Visual Studio Keyboard Shortcuts Wrap-up (MSDN Flash – Feb. 2, 2009)

In this edition, I am going to wrap up a few loose ends with a selection of miscellaneous keyboard shortcuts and links to a summary keyboard shortcut poster. Debugging: I realize that none of you would write bugs, but in case you meet someone that does or perhaps on occasion you need to debug some […]