This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; | |
using System.Configuration; | |
using System.Diagnostics; | |
namespace Spynical.Settings | |
{ | |
/// <summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq.Expressions; | |
public static class PropertyNameExtensions | |
{ | |
/// <summary> | |
/// Extension method for exposing the name of properties without resorting to | |
/// magic strings. | |
/// Use: objectReference.PropertyName( x => x.{property} ) to retrieve the name. | |
/// I.e. objectReference.PropertyName( x => x.IsActive ); //will return "IsActive". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TaxCalculator | |
{ | |
private static readonly IList<TaxBracket> TaxBrackets; | |
static TaxCalculator() | |
{ | |
TaxBrackets = setupTaxBrackets(); | |
} | |
public decimal CalculateTax( decimal grossIncome ) |