Friday, January 28, 2011

Reflection to pull description attribute for class


//get description from attribute on class
private static string GetDescription(Type type)
{
return (from v in type.GetCustomAttributes( typeof(System.ComponentModel.DescriptionAttribute), true)
select ((System.ComponentModel.DescriptionAttribute)v).Description).FirstOrDefault();
}


[Description("Users description!")]
public class MyClass
{
}


Friday, November 05, 2010

Taxonomy of Fallacies

taxonomy of logical fallacies

Thursday, June 03, 2010

sql server database size report

SELECT * INTO #T1 FROM sys.sysfiles;
DELETE FROM #T1;
EXECUTE sp_msforeachdb 'INSERT INTO #T1 SELECT * from ?.sys.sysfiles'

select ( size * 0.00000762939453125 )as SizeGB , * from #t1
order by size desc

Monday, May 24, 2010

Microsoft Video Link Collection

Silverlight
http://silverlight.net/learn
http://www.silverlight.net/learn/videos/all/

ASP + AJAX + MVC
http://asp.net/learn
http://www.asp.net/ajax/videos
http://www.asp.net/mvc/videos
http://www.asp.net/web-forms

Winform
http://windowsclient.net/learn
http://windowsclient.net/learn/videos.aspx

The rest of the How do I?
http://msdn.microsoft.com/en-us/bb629407.aspx