Category: C#

Interfacing With Multithreading Patterns Prior to TPL and C# 5.0

Legacy Version of C# Multithreading Multithreading patterns are used to address the multithreading complexities of monitoring an asynchronous operation, thread pooling, avoiding deadlocks, and implementing atomicity and synchronization across operations and data access. This is a thorough blog that combs through all you’d need to know about multithreading if you were working in a legacy […]

Using Tuples for Overriding Equality and GetHashCode

Overriding Objects The implementation of Equals() and GetHashCode() used to be complex, but with C# 7.0 Tuples, the actual code is boilerplate. For Equals(): It’s necessary to compare all the contained identifying data structures while avoiding infinite recursion or null reference exceptions. For GetHashCode(): It’s necessary to combine the unique hash code of each of […]

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 non visual control and […]

Master the Basics of MVVM to Simplify Building WPF Applications

Getting Started: Model-View-ViewModel Pattern using Windows Presentation Framework Estimated reading time: 9 minutes The Windows Presentation Framework (WPF) takes 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 […]

Application Deployment Made Easy

Smoothly Deploying Your App With Squirrel Estimated reading time: 7 minutes Many .NET developers are familiar with ClickOnce, Microsoft’s simple deployment solution for quickly packaging and deploying software that is easy for end-users to install. However, these conveniences come with limitations. There are only a couple automatic update situations. To show custom UI when an […]

Unit Testing With Xamarin Forms

Exploring Xamarin Forms In a recent application that IntelliTect developed for a client, we were tasked with building a Xamarin forms application that supported Windows, Android, and iOS.  Due to the cross-platform support inherent with using Xamarin, a large majority of our code was common amongst all three implementations.  As with most cross-platform projects, however, […]

Fixing System Value Tuple Error

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 easily corrects. When encountered, the error will look like this on the code editor: The issue is that […]