Tuesday, January 30, 2007
Monday, January 29, 2007
Sunday, January 28, 2007
Generics and XML Comments - how to
XML Comments don't like generics that much. Here's how to document a generic type - currently, at least:
XML doc comments and C#'s generic syntax don't mix. In order to help work around this, we allow you to use {}'s in place of <>'s when referring to generic types in crefs. So, imagine the following code:From https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=91982////// This class implements class Example/// : IComparable { // implementation of IComparable }
Saturday, January 27, 2007
Friday, January 26, 2007
HELLO_WORLD
I'm not too happy with the _______() method - it's a bit too obvious. Otherwise the following is a great little .net console application:
using System; using System.Diagnostics; namespace ___ { class _____ { static void Main(string[] args) { _______(); } static void _______() { ______(_(_(_(_(_(_(_(__())))))))); ______(_(_(_(_(__()))))); ______(_(_(_(_(_(_(_(_(_(_(_(__())))))))))))); ______(_(_(_(_(_(_(_(_(_(_(_(__())))))))))))); ______(_(_(_(_(_(_(_(_(_(_(_(_(_(_(__()))))))))))))))); ______(); ______(_(_(_(_(_(_(_(_(_(_(_(_(_(_(_(_(_(_(_(_(_(_(__()))))))))))))))))))))))); ______(_(_(_(_(_(_(_(_(_(_(_(_(_(_(__()))))))))))))))); ______(_(_(_(_(_(_(_(_(_(_(_(_(_(_(_(_(_(__())))))))))))))))))); ______(_(_(_(_(_(_(_(_(_(_(_(__())))))))))))); ______(_(_(_(__())))); } static string _(string _) { return _ + __(); } static string ___() { return __(); } static void ______() { Console.Write(___()); } static void ______(string _) { Console.Write((char)(_.Length + 58)); } static string __() { return new StackTrace().GetFrame(1).GetMethod().Name; } } }
Thursday, January 25, 2007
Links for 2007-01-24 [del.icio.us]
Wednesday, January 24, 2007
Tuesday, January 23, 2007
Sunday, January 21, 2007
Saturday, January 20, 2007
Friday, January 19, 2007
Links for 2007-01-18 [del.icio.us]
- SD Times - Give It a REST
- Daily Kos: Re-Improved Colbert transcript (now with complete text of Colbert-Thomas video!)
- GridView with priority sorting
- Adding an insert row to GridView
- Matt Dotson's .NET Tips & Tricks : Real World GridView: Two Headed & Grouping GridViews
- Cutting Edge: Extending the GridView Control -- MSDN Magazine, May 2006
Sent using R|mail.
Labels: links
Thursday, January 18, 2007
Wednesday, January 17, 2007
ASP.NET, C#: Simpler Trace
I found myself needing to trace some variables in my ASP.NET app, but rather than calling Page.Trace from my pages, and HttpContext.Current.Trace from my static utility methods, I decided to simplify standardize the process. The result is below; it uses the Callstack and Reflection to determine the type and name of the member that called the trace method:
/// <summary> /// Writes a name and value to the Trace output, categorized by the type and member /// (property or method) from which the method was called. /// </summary> /// <param name="name">Name of variable to trace.</param> /// <param name="value">Value of variable to trace.</param> public static void WriteTrace(string name, object value) { System.Reflection.MethodBase callingMethodBase = new System.Diagnostics.StackTrace().GetFrame(1).GetMethod(); string callingMethod = string.Format("{0}.{1}", callingMethodBase.DeclaringType.Name, callingMethodBase.Name); string message = string.Format("{0}: {1}", name, value); HttpContext.Current.Trace.Write(callingMethod , message); }
Monday, January 15, 2007
Saturday, January 13, 2007
Thursday, January 11, 2007
Links for 2007-01-10 [del.icio.us]
Wednesday, January 10, 2007
Links for 2007-01-09 [del.icio.us]
Tuesday, January 09, 2007
Saturday, January 06, 2007
Links for 2007-01-05 [del.icio.us]
Friday, January 05, 2007
Links for 2007-01-04 [del.icio.us]
- Download Free Software for Help Desk, Asset Management, and IT Inventory
- K2.net :: View topic - K2 SP4 runningo n FW 2.0
- K2.net :: View topic - Connection Problem
- K2.net :: View topic - Originator allways the same
- K2.net :: View topic - Impersonation
- KB000098 - K2.net 2003 running on Windows 2003 Server SP1
- http://www.roadsleeper.com/gti/maf.html
- ASP.NET Articles by Harish Ranganathan: You may receive the error "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection" - Part II
- How to go to M.I.T. for free | csmonitor.com
- (24)slash7 - Drop That Design! 6 Things You Need to Know About Color
- ASCII by Jason Scott: Freedom, Justice and a Disturbingly Gaping Ass
- Yet another iPod manager - Home
- Sharepod
- EphPod - iPod for Windows (and Linux) :: HOME
- Griffin Technology: iTrip Auto - FM Transmitter and Car Charger
- Griffin Technology: iTrip (Dock) - FM Transmitter for iPod
Sent using R|mail.
Labels: links