The digital home of Richard Garside

This is my digital home, a resting place for my personal and client projects. I'm a web developer based in Leeds. I specialise in .NET MVC and apps for Windows 10 and Mac. You can find out more about me here.

Recent stuff from my blog

Comparing the files in two directories with Powershell

If you've got yourself in a bit of a mess while copying files from one place to another, or if you've got a poor person's backup of stuff in another directory then you might want to compare two folders to see if they contain the same files.

The Compare-Object cmdlet lets you do this. Here is a simple example to compare the files in two directories based just on the file name.

compare-object -referenceobject (get-childitem -recurse  | where { ! $_.PSIsContainer }) -differenceobject (get-childitem 'D:\simple-backup' -recurse  | where { ! $_.PSIsContainer }) -Property Name

Riese & Müller Roadster Vario Review

Riese and Müller Roadster Vario

I spent ages reading specs and reviews of e-bikes and watching videos when I was looking to buy my first e-bike. I found several favourable reviews of Riese and Müller’s Roadster Vario and decided it was the bike I wanted. The reviews were by all by people who owned bike shops though and I really wanted a review my someone who was using the bike day in and day out. Now I’ve been cycling my Roadster to and from work and all over the place for the past month I thought I could write the review that I had been looking for before. As this is the only e-bike I’ve ridden for longer than a test ride, …

The best way to implement INotifyPropertyChanged in .NET Maui

This is the best way that I've discovered to implement INotifyPropertyChanged in a XAML based MVVM app without downloading any extra supporting code.It relies on the ref keyword to allow a method in the base class to modify the property that you wish to raise a property changed event for. The code is fairly concise and it doesn't add any unseen overhead.

In your view model all you need to do is:

namespace Nogginbox.MyApp.ViewModels;

public class MyViewModel : ObservableViewModelBase

{

public string Name

{

get => _name;

set => SetProperty(ref _name, value);

} …

More from my blog

You can read more from blog here.