Video: Is Xamarin Forms the Right Choice for Your Next App?

,
November 29, 2018 / No Comment

Using Xamarin Forms is a quick win according to Kevin Bost, Xamarin certified senior developer at IntelliTect and C# instructor at Eastern Washington University.
Xamarin is Microsoft’s platform for building mobile applications. Using a shared C# codebase, developers can build android and IOS apps at the same time using the Xamarin.Forms library. It isn’t a common UI; it’s shared […]
Read more

AUTHOR: CATEGORY: Blog, Xamarin

Potential New Features of C# 8.0 Exposed

,
November 7, 2018 / No Comment

Can’t satisfy your thirst for C# knowledge?
Hang around Mark Michaelis long enough and you’ll get up to speed in no time!
Mark has been traveling within the US, and as far as Scandinavia, spreading the C# love. You might have seen him at Visual Studio LIVE! events in Chicago or San Diego or at .Net User Group meetups in […]
Read more

AUTHOR: CATEGORY: Blog, C#

Interfacing with Multithreading Patterns prior to TPL and C# 5.0

,
April 9, 2018 / 2 Comments

Legacy Blog – Pre C# 5.0
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 version of C#. Although […]
Read more

AUTHOR: CATEGORY: .Net, C#, Uncategorized

Using Tuples for overriding Equality() and GetHashCode()

,
March 28, 2018 / No Comment

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 the non-null contained identifying data structures […]
Read more

AUTHOR: CATEGORY: Blog, C#

The Essential C# 7.0 book is almost here!

,
March 19, 2018 / No Comment

The newest edition of Mark Michaelis’ Essential C# book releases May 28th.

“Mark is super smart, insists on understanding everything to the core, and has phenomenal insight into how things affect real developers. . . . He goes right to the essence and communicates with great integrity—no sugarcoating—and has a keen eye for practical value and real-world problems.”
—From […]
Read more

AUTHOR: CATEGORY: Headlines

Timers Prior to Async/Await Pattern of C# 5.0

,
October 9, 2017 / No Comment

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 the behavior from within the […]
Read more

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

,
September 19, 2017 / No Comment

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 at this getting started guide.
Read more

AUTHOR: CATEGORY: C#, WPF

C# 7.0: Tuples Explained

,
July 27, 2017 / No Comment

Back in November, in the Connect() special issue of MSDN Magazine, I provided an overview of C# 7.0 in which I introduced tuples. Click here for the overview. In this blog I delve into tuples again, covering the full breadth of the syntax options.
To begin, let’s consider the question:
Why tuples?
On occasion, you’ll likely find it useful to […]
Read more

AUTHOR: CATEGORY: Blog

Deterministic Finalization with IDisposable and the Using Statement

,
October 14, 2016 / No Comment

The problem with finalizers on their own is that they don’t support deterministic finalization (the ability to know when a finalizer will run). Rather, finalizers serve the important role of being a backup mechanism for cleaning up resources if a developer using a class neglects to call the requisite cleanup code explicitly.
For example, consider the TemporaryFileStream, which includes not […]
Read more

AUTHOR: CATEGORY: .Net, Blog, C#

Locking a Block of Code With an Integer

,
June 27, 2016 / No Comment

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 value type. But when you […]
Read more

AUTHOR: CATEGORY: .Net, Blog, C#