Click here to Skip to main content

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

Articles: 4, Tip/Tricks: 7

RSS Feed

Average article rating: 4.78

ASP.NET Controls
General
Posted: 2 Jun 2006   Updated: 15 Jun 2006   Views: 60,989   Rating: 4.73/5    Votes: 14   Popularity: 5.42
Licence: The Code Project Open License (CPOL)      Bookmarked: 51   Downloaded: 483
An updated version of the AutoActivateControl class posted by Dundas Software.
C#
General
Posted: 31 Jul 2002   Updated: 28 Jul 2010   Views: 230,868   Rating: 4.76/5    Votes: 40   Popularity: 7.62
Licence: The Code Project Open License (CPOL)      Bookmarked: 106   Downloaded: 3,573
A pair of classes to encapsulate access to NTFS alternative data streams.
VB.NET
General
Posted: 13 May 2002   Updated: 13 May 2002   Views: 186,206   Rating: 4.67/5    Votes: 14   Popularity: 5.35
Licence: The Code Project Open License (CPOL)      Bookmarked: 36   Downloaded: 252
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: 324,394   Rating: 4.97/5    Votes: 50   Popularity: 8.44
Licence: The Code Project Open License (CPOL)      Bookmarked: 108   Downloaded: 4,365
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.93

Tree Controls
General
Posted: 24 Jan 2012   Updated: 24 Jan 2012   Views: 4,285   Rating: 4.67/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   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: 3,212   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...
Algorithms & Recipes
General
Posted: 17 May 2011   Updated: 17 May 2011   Views: 1,318   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: 2,830   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: 1,955   Rating: 0.0 / 5    Votes: 0   Popularity: 0.0
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: 3,619   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: 3,105   Rating: 5.00/5    Votes: 1   Popularity: 0.00
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
Follow on   Twitter   Google+


Advertise | Privacy | Mobile
Web04 | 2.8.141223.1 | Last Updated 29 Dec 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid