Click here to Skip to main content
15,867,756 members

Articles by Richard Deeming (Articles: 4, Project: 1, Tip/Tricks: 9)

Articles: 4, Project: 1, Tip/Tricks: 9

RSS Feed

Average article rating: 4.52

Programming Languages
C#
31 Jul 2002   Updated: 15 Aug 2016   Rating: 4.85/5    Votes: 53   Popularity: 8.11
Licence: CPOL    Views: 500,096     Bookmarked: 132   Downloaded: 5,357
Please Sign up or sign in to vote.
A pair of classes to encapsulate access to NTFS alternative data streams.
24 Sep 2002   Updated: 11 Nov 2003   Rating: 4.95/5    Votes: 59   Popularity: 8.57
Licence: CPOL    Views: 519,099     Bookmarked: 117   Downloaded: 8,893
Please Sign up or sign in to vote.
Classes to enumerate network shares on local and remote machines, and convert local file paths to UNC paths.
Visual Basic
13 May 2002   Updated: 13 May 2002   Rating: 3.62/5    Votes: 15   Popularity: 4.26
Licence: CPOL    Views: 219,981     Bookmarked: 37   Downloaded: 338
Please Sign up or sign in to vote.
Demonstrates a single-instance application which can pass command-line parameters to a previous instance.
Web Development
ASP.NET
2 Jun 2006   Updated: 15 Jun 2006   Rating: 4.67/5    Votes: 19   Popularity: 5.21
Licence: CPOL    Views: 77,710     Bookmarked: 50   Downloaded: 522
Please Sign up or sign in to vote.
An updated version of the AutoActivateControl class posted by Dundas Software.

Average blogs rating:

No blogs have been submitted.

Average tips rating: 3.72

Desktop Programming
Windows Forms
24 Jan 2012   Updated: 24 Jan 2012   Rating: 3.20/5    Votes: 5   Popularity: 2.24
Licence: CPOL    Views: 12,530     Bookmarked: 2   Downloaded: 0
Please Sign up or sign in to vote.
You can make this slightly more reusable by targeting the IEnumerable interface and providing a function to return the children of each item:public static class EnumerableExtensions{ private static IEnumerable DescendantsAndSelfIterator( IEnumerable source, ...
WPF
6 Feb 2015   Updated: 6 Feb 2015   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: CPOL    Views: 13,600     Bookmarked: 4   Downloaded: 165
Please Sign up or sign in to vote.
This is an alternative for "Markup Extension for Generic classes"
General Programming
String
24 Jan 2012   Updated: 24 Jan 2012   Rating: 2.33/5    Votes: 3   Popularity: 1.11
Licence: CPOL    Views: 9,380     Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
If you're stuck with .NET 3.5, you can use the Aggregate extension method[^]:string cities_string = cities.Aggregate(new StringBuilder(), (sb, c) =>{ if (0 != sb.Length) sb.Append(", "); sb.Append(c.Name); return sb;}, sb => sb.ToString());
Programming Languages
C#
23 Aug 2011   Updated: 23 Aug 2011   Rating: 4.67/5    Votes: 4   Popularity: 2.81
Licence: CPOL    Views: 12,891     Bookmarked: 2   Downloaded: 0
Please Sign up or sign in to vote.
For .NET 4.0:using System;using System.Collections.Generic;using System.ComponentModel;using System.Reflection;using System.Linq.Expressions;static class AutomaticPropertyExtensions{ private static class Cache where T : class { public static readonly...
2 Aug 2017   Updated: 2 Aug 2017   Rating: 4.60/5    Votes: 3   Popularity: 2.19
Licence: CPOL    Views: 14,580     Bookmarked: 3   Downloaded: 0
Please Sign up or sign in to vote.
Adding cancellation support to the SendMailAsync method
17 May 2011   Updated: 17 May 2011   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: CPOL    Views: 5,640     Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
You can use System.Linq.Expressions to avoid converting the Enum value to an integer type.Here's a solution inspired by the MiscUtil project[^]:using System;using System.Collections.Generic;using System.Linq;using System.Linq.Expressions; public static class...
18 Jan 2011   Updated: 18 Jan 2011   Rating: 4.20/5    Votes: 5   Popularity: 2.94
Licence: CPOL    Views: 8,280     Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
Another option would be to use the Elements extension method[^]:var root = XElement.Load("Books.xml"); var books = from node in root.Elements("Book").Elements("Subject") select node.Value.Trim(); foreach (string subject in books){ listBox1.Items.Add(subject);}
C# 4.0
18 Jul 2014   Updated: 18 Jul 2014   Rating: 3.40/5    Votes: 3   Popularity: 1.62
Licence: CPOL    Views: 8,691     Bookmarked: 3   Downloaded: 0
Please Sign up or sign in to vote.
This is an alternative for "Using Extension Methods To Avoid XML Problems"
XML
25 Jan 2011   Updated: 25 Jan 2011   Rating: 2.33/5    Votes: 3   Popularity: 1.11
Licence: CPOL    Views: 8,821     Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
You can avoid all of this by using the explicit cast operators:public XElement Element{ set { this.MyVar1 = (string)value.Element("MyVar1") ?? "NO VALUE"; this.MyVar2 = (string)value.Element("MyVar2") ?? "NOVAL"; }}Both XElement and XAttribute define...

Average reference rating:

No reference articles have been posted.

Average project rating: 0.00

Database Development
SQL Server
28 Feb 2022   Updated: 28 Feb 2022   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: GPL3    Views: 4,980     Bookmarked: 3   Downloaded: 11
Please Sign up or sign in to vote.
EF Core methods to call SQL Server's TRY_PARSE function
Software Developer CodeProject
United Kingdom United Kingdom
I started writing code when I was 8, with my trusty ZX Spectrum and a subscription to "Input" magazine. Spent many a happy hour in the school's computer labs with the BBC Micros and our two DOS PCs.

After a brief detour into the world of Maths, I found my way back into programming during my degree via free copies of Delphi and Visual C++ given away with computing magazines.

I went straight from my degree into my first programming job, at Trinet Ltd. Eleven years later, the company merged to become ArcomIT. Three years after that, our project manager left to set up Nevalee Business Solutions, and took me with him. Since then, we've taken on four more members of staff, and more work than you can shake a stick at. Smile | :)

Between writing custom code to integrate with Visma Business, developing web portals to streamline operations for a large multi-national customer, and maintaining RedAtlas, our general aviation airport management system, there's certainly never a dull day in the office!

Outside of work, I enjoy real ale and decent books, and when I get the chance I "tinkle the ivories" on my Technics organ.