Click here to Skip to main content
12,070,942 members (66,063 online)

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

Articles: 4, Tip/Tricks: 8

RSS Feed

Average article rating: 4.77

ASP.NET Controls
General
Posted: 2 Jun 2006   Updated: 15 Jun 2006   Views: 62,810   Rating: 4.67/5    Votes: 15   Popularity: 5.56
Licence: The Code Project Open License (CPOL)      Bookmarked: 51   Downloaded: 492
An updated version of the AutoActivateControl class posted by Dundas Software.
C#
General
Posted: 31 Jul 2002   Updated: 28 Jul 2010   Views: 250,170   Rating: 4.77/5    Votes: 42   Popularity: 7.74
Licence: The Code Project Open License (CPOL)      Bookmarked: 111   Downloaded: 4,121
A pair of classes to encapsulate access to NTFS alternative data streams.
VB.NET
General
Posted: 13 May 2002   Updated: 13 May 2002   Views: 189,870   Rating: 4.67/5    Votes: 14   Popularity: 5.35
Licence: The Code Project Open License (CPOL)      Bookmarked: 36   Downloaded: 271
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: 352,932   Rating: 4.97/5    Votes: 56   Popularity: 8.69
Licence: The Code Project Open License (CPOL)      Bookmarked: 110   Downloaded: 5,401
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: 5,730   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: 5,010   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: 5,240   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 4   Downloaded: 41
This is an alternative for "Markup Extension for Generic classes"
Algorithms & Recipes
General
Posted: 17 May 2011   Updated: 17 May 2011   Views: 1,720   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: 3,680   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,070   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: 4,700   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,020   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   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
Web04 | 2.8.160208.1 | Last Updated 10 Feb 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid