Skip to content

Instantly share code, notes, and snippets.

View driscollwebdev's full-sized avatar

Brian Driscoll driscollwebdev

View GitHub Profile
@driscollwebdev
driscollwebdev / gist:993105
Created May 26, 2011 13:10
Interface article sample code 3
class PerishableItem : IProduct
{
#region IProduct Interface Data Members
public string Name { get; set; }
public double Price { get; set; }
public double UnitPrice { get; set; }
public uint SKU { get; set; }
#endregion
//Omitted Code... it's the same as above
@driscollwebdev
driscollwebdev / gist:993099
Created May 26, 2011 13:09
Interface article sample code 2
interface IProduct
{
string Name { get; set; }
double Price { get; set; }
double UnitPrice { get; set; }
uint SKU { get; set; }
}
@driscollwebdev
driscollwebdev / gist:993095
Created May 26, 2011 13:08
Interface article sample code
class PerishableItem
{
public string Name { get; set; }
public double Price { get; set; }
public double UnitPrice { get; set; }
public uint SKU { get; set; }
public DateTime SellByDate { get; set; }
public DateTime ExpirationDate { get; set; }
protected delegate void ExpiredItemHandler(object sender,ExpiredItemEventArgs e);
public event ExpiredItemHandler Expired;
@driscollwebdev
driscollwebdev / RadGridExtensions.cs
Created May 20, 2011 13:40
Extension methods for Telerik RadGrid
/**
Copyright (c) 2011 Brian Driscoll
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@driscollwebdev
driscollwebdev / facade.cs
Created May 12, 2011 14:25
Facade Implementation
public class MyClassFoo
{
public string Foo { get; set; }
public MyClassFoo(string foo)
{
Foo = foo;
}
public string DoSomethingWithFoo()
@driscollwebdev
driscollwebdev / ScriptTimer.php
Created March 31, 2011 20:27
The ScriptTimer class...
<?php
/**
*
* The ScriptTimer class provides an easy and efficient method for identifying
* time sinks in your code. Ideally you'd insert time markers around lines of
* code that you believe are causing your application to run slowly so that you
* can identify the slow-running culprit and fix it!
*
* @author Brian Driscoll
* @license The MIT License