Click here to Skip to main content
12,508,491 members (54,876 online)

Articles by FDW (Tip/Tricks: 8)

Tip/Tricks: 8

RSS Feed
No articles have been posted.
No blogs have been submitted.

Average tips rating: 3.64

Database
General
Posted: 3 Nov 2011   Updated: 6 Nov 2011   Views: 8,513   Rating: 0.0 / 5    Votes: 0   Popularity: 0.0
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0
How to define a one to one relation
C#
General
Posted: 25 Mar 2011   Updated: 25 Mar 2011   Views: 5,321   Rating: 4.92/5    Votes: 10   Popularity: 4.90
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   Downloaded: 0
Maybe this is helpful, it tries to switch to the first running instance:namespace UltraSimple.Win{ static class Program { [System.Runtime.InteropServices.DllImport("user32.dll")] public static extern bool SetForegroundWindow(IntPtr hWnd); [STAThread] ...
Algorithms & Recipes
General
Posted: 17 May 2011   Updated: 17 May 2011   Views: 1,870   Rating: 0.0 / 5    Votes: 0   Popularity: 0.0
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0
What about a more complete approach?Define a few caches:private static GenericAlias.Dictionary aoCompositeValues = new GenericAlias.Dictionary();private static GenericAlias.Dictionary aoArrayOfValues = new GenericAlias.Dictionary<Type,...
Programming Tips
General
Posted: 3 Jun 2011   Updated: 5 Jun 2011   Views: 1,590   Rating: 0.0 / 5    Votes: 0   Popularity: 0.0
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0
Here is a couple for String and StringBuilder. The String versions are handy (compared to the already existing instance versions (that are actually being used)) because they work against null values (e.g., ((string)null).IsNullOrEmpty()).public static class ExtensionMethodsString{ ...
Posted: 9 Jun 2011   Updated: 9 Jun 2011   Views: 2,842   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0
This is what I would do:using System;using NUnit.Framework;using System.Reflection;namespace Profix.Utils.Xpo.UnitTests{ [TestFixture] public class Functions { private void Tax() { Console.WriteLine("Computed Tax."); } private void Sale() {...
Posted: 24 Jun 2011   Updated: 24 Jun 2011   Views: 2,771   Rating: 0.0 / 5    Votes: 0   Popularity: 0.0
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0
I do think the approach is over complicated, but in some cases there may be (a small) benefit. As an alternative I would offer:First version (no common test):((Action)(() =>{ if (!Step1()) return; if (!Step2()) return;}))();Second version (common...
Posted: 6 Dec 2011   Updated: 6 Dec 2011   Views: 1,951   Rating: 0.0 / 5    Votes: 0   Popularity: 0.0
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
This is less expensive:For any of the next strings, it gives 8:"Mr O'Brien-Smith arrived at 8.30 and spent \t $1,000.99"" Mr O'Brien-Smith arrived at 8.30 and spent \t $1,000.99""Mr O'Brien-Smith arrived at 8.30 and spent \t $1,000.99 "" Mr O'Brien-Smith arrived at 8.30 and...
Posted: 2 Dec 2011   Updated: 25 Dec 2011   Views: 23,991   Rating: 1.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
Lock multiple (up to 2) objects, non blocking
No reference articles have been posted.

FDW
Netherlands Netherlands
No Biography provided


Advertise | Privacy | Mobile
Web02 | 2.8.160927.1 | Last Updated 29 Sep 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid