Click here to Skip to main content
12,691,453 members (30,096 online)

Articles by Richard Deeming (Articles: 4, Tip/Tricks: 8)

Articles: 4, Tip/Tricks: 8

RSS Feed

Average article rating: 4.78

ASP.NET Controls
General
Posted: 2 Jun 2006   Updated: 15 Jun 2006   Views: 64,592   Rating: 4.67/5    Votes: 16   Popularity: 5.63
Licence: The Code Project Open License (CPOL)      Bookmarked: 51   Downloaded: 497
An updated version of the AutoActivateControl class posted by Dundas Software.
C#
General
Posted: 31 Jul 2002   Updated: 15 Aug 2016   Views: 373,958   Rating: 4.81/5    Votes: 50   Popularity: 8.17
Licence: The Code Project Open License (CPOL)      Bookmarked: 128   Downloaded: 4,567
A pair of classes to encapsulate access to NTFS alternative data streams.
VB.NET
General
Posted: 13 May 2002   Updated: 13 May 2002   Views: 193,424   Rating: 4.67/5    Votes: 14   Popularity: 5.35
Licence: The Code Project Open License (CPOL)      Bookmarked: 37   Downloaded: 281
Demonstrates a single-instance application which can pass command-line parameters to a previous instance.
Internet / Network
Network
Posted: 24 Sep 2002   Updated: 11 Nov 2003   Views: 381,839   Rating: 4.97/5    Votes: 57   Popularity: 8.73
Licence: The Code Project Open License (CPOL)      Bookmarked: 113   Downloaded: 6,202
Classes to enumerate network shares on local and remote machines, and convert local file paths to UNC paths.
No blogs have been submitted.

Average tips rating: 4.95

Tree Controls
General
Posted: 24 Jan 2012   Updated: 24 Jan 2012   Views: 6,561   Rating: 4.67/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
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, ...
C#
General
Posted: 23 Aug 2011   Updated: 23 Aug 2011   Views: 6,322   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
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...
Windows Presentation Foundation
General
Posted: 6 Feb 2015   Updated: 6 Feb 2015   Views: 6,201   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 4   Downloaded: 53
This is an alternative for "Markup Extension for Generic classes"
Algorithms & Recipes
General
Posted: 17 May 2011   Updated: 17 May 2011   Views: 2,070   Rating: 0.0 / 5    Votes: 0   Popularity: 0.0
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0
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...
Programming Tips
General
Posted: 18 Jan 2011   Updated: 18 Jan 2011   Views: 4,202   Rating: 5.00/5    Votes: 4   Popularity: 3.01
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
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);}
Posted: 25 Jan 2011   Updated: 25 Jan 2011   Views: 3,800   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
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...
Posted: 24 Jan 2012   Updated: 24 Jan 2012   Views: 5,430   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0
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());
Posted: 18 Jul 2014   Updated: 18 Jul 2014   Views: 4,610   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 3   Downloaded: 0
This is an alternative for "Using Extension Methods To Avoid XML Problems"
No reference articles have been posted.

Richard Deeming
Software Developer Nevalee Business Solutions
United Kingdom United Kingdom
No Biography provided


Advertise | Privacy | Mobile
Web02 | 2.8.170117.1 | Last Updated 17 Jan 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid