Brad Abrams
Design Guidelines, Managed code and the .NET Framework
October 2004 - Posts
Whidbey Readiness Quiz: More on arrays
Continuing examining new types in Whidbey… My goal is to motivate why we added Whidbey features through simple little quizzes. For today, let’s say you have several arrays of ints and you want to sum different sub ranges from each one (that is, a different
Read More...
Feedback on collection Interfaces
Krzysztof is asking for your feedback on some changes we are considering for the generic collections interface… Please join in the conversation… IComaprer & IComparable Refactoring Proposal
Read More...
Whidbey Readiness Quiz (Answer): Converting array values
Well, lots of good responses … I can see this is going to be a hard group to stump. Nat nailed all the points quickly, even if it took him two posts to do it ;-)… there were several other great responses as well. Here is the code I came up with… I wanted
Read More...
I'll take even the smallest evidence of success
I have made it my mission to institutionalize the value good API design. I strongly believe that this is key to making developers more productive and happy on our platform. One very small way to measure that success is to notice where 3 rd parties have
Read More...
Perf Tips for Library developers
Rico has some good tips particularly for people building low level managed libraries… worth a read. I see the mono guys already picked it up , I wanted to make sure others saw it as well...
Read More...
Whidbey Readiness Quiz: Converting array values
Thinking about my last little quiz , I realize there are thousands (literally) of new methods across the framework in Whidbey. How better to introduce\explain them than illustrating the problem they are intended to fix.. Let’s say you had this code: string
Read More...
Off to Saint Louis...
I will be doing some college recruiting at Washington University in Saint Louis Nov 8 th and 9 th . I already have a talk on campus on the 9 th (I will post more details on that when I get them) but if there is a local user’s group that would like a sneak
Read More...
Answer: More Exception Mysteries
Well, you folks were a lot quicker than I was… Steve got basically what I was looking for very quickly after I posted... Ben’s answer (to add his own local Exception class) was cute, but was clearly cheating as I did say no new classes… What I was looking
Read More...
Quiz: More Exception Mysteries
Yesterday I heard about a cool Whidbey feature that inspired me to come up with this little quiz. The code below when run will print out: In try In catch After try..catch class Program { static void Main ( string [] args) { try { Console .WriteLine( "In
Read More...
The SLAR on System.Byte
Continuing in the series on sharing some of the information in the .NET Framework Standard Library Annotated Reference Vol 1 here is an annotation from the System.Byte class. Boy, was this ever a controversial point when we first started the framework,
Read More...
On shipping...
I ran across the great quote on shipping software from my boss… I thought you folks might enjoy it.. Shipping is never easy, but always fun, kind of like bull ridding, you wonder why you got on in the first place, sometimes get hurt, but always remember
Read More...
Answer: Instantiating an interface
Well, that was a fun little quiz… I should have added “no scoping tricks” to the list of rules, but what Roy Osherove suggested does work. But Kevin Dente gives the answer I was looking for. Whenever you see something funny going on in the framework 9
Read More...
The SLAR gets a review...
“ B rad Abrams' .NET Framework Standard Library Annotated Reference should be on every .NET developer's bookshelf, regardless of the type of .NET development you're doing ” and I didn’t even pay him ;-) Read the full review here: .NET Reference for Every
Read More...
Quiz: Instantiating an interface
I got this one from a reader down under… I gotta say, it pretty much had me stumped, so I thought I’d share it with you… Compile the following code and you get this error message: Cannot create an instance of the abstract class or interface 'IFoo' interface
Read More...
Brian Harry on the CLR
I just noticed that the ServerSide has a good interview with Brian Harry who was a founding member of the CLR team. He has some good thoughts on the history of the CLR and our core value adds… and Oh, yea, he talks about Team System as well ;-) Brian
Read More...
The Good and the Bad: Obsoletion in the Framework
You are likely familiar with this error message: Program.cs(969,9): warning CS0618: System.Collections.CaseInsensitiveHashCodeProvider' is obsolete: 'Please use StringComparer instead You get it when you use a Type or member in the Framework that we have
Read More...
Answer: Initializing static fields correctly
Well – quite a good discussion . This is one of the reasons I love blogs. I really learned something today based on your feedback and we made a change to the product because of it . So thanks for your feedback. As many of you said, C1 and C2 result in
Read More...
Quiz: Initializing static fields correctly
A dev on the team recently found a bug in Whidbey a long these lines… Say you want to initialize the value of a static int to zero… which code should you use (C1 or C2) and, of course the most important point, why? class C1 { private static int value
Read More...
Color-Coded Source code in blogs
Someone recently asked me how I do the color coding of source code in my blog. Well, it is really very simple. I do my work in VS 2005 Express and then cut and paste it into word (an email actually), then cut and paste that into a blog entry… and presto…
Read More...
XPSP2 and home wireless network: A confession and the joy...
Hello… my name in Brad Abrams and I have a confession to make: I could not get my home wireless network to work. I know the shame of it… I work at the largest software company in the word, the same software company that makes the OS my wife and I are
Read More...
Generics and the special constraints
Someone recently asked me to update an old post of mine Reflection and Generics . You gotta be careful what you write in blogs as they seem to live forever. Well, it is true, this needs a little updating. We no longer use the NewConstraintAttribute (or
Read More...
New Design Guideline: Be consistent in naming parameters when overloading, overriding and implementing interfaces
We have seen this come up a more than a few times in WinFX API reviews so I thought it was worth adding a quick guideline… As always, please let me know if you have any questions or comments. You can check out the base design guidelines and my incremental
Read More...
Quiz: Delegates and private methods
Given the code below, what is the result of the “Direct call” line and the “call via a delegate” lines? And, of course, why? For a little sport, try it without compiling the code first. public delegate void Callback (); class Program { static void Main
Read More...
How to find if the logged user is a admin or not?
Just saw a mail over an internal alias showing off how to find out if the currently logged on user is an admin… we make this reasonably easy in Whidbey. using System; using System.Security.Principal; class Test { public static void Main () { if ( new
Read More...
Search
Go
This Blog
Home
Email
本博客中文版 (View in Chinese)
These postings are provided "AS IS" with no warranties, and confer no rights.
Tags
.NET Framework
.NETFx3.0
Acropolis
AJAX
AjaxWorld
ASP.NET
ASPMVC
Atlas
BCL
Blogging
CLR
DevLink07
Framework
Framework Design Guidelines
ISV
MEF
Microsoft AJAX Library
Mix07
Mix08
New Guideline
Orcas
PDC
Port25
Program Manager
RainbowsEnd
Random
ReMixBoston07
Silverlight
SLAR
Software Development
TechEd
TheAjaxExperience
VB
VernorVinge
WinForms
WPF
Archives
May 2008 (2)
April 2008 (11)
March 2008 (21)
February 2008 (12)
January 2008 (14)
December 2007 (13)
November 2007 (13)
October 2007 (21)
September 2007 (7)
August 2007 (13)
July 2007 (10)
June 2007 (25)
May 2007 (18)
April 2007 (15)
March 2007 (15)
February 2007 (6)
January 2007 (15)
December 2006 (8)
November 2006 (12)
October 2006 (13)
September 2006 (8)
August 2006 (5)
July 2006 (12)
June 2006 (15)
May 2006 (12)
April 2006 (10)
March 2006 (15)
February 2006 (14)
January 2006 (13)
December 2005 (7)
November 2005 (18)
October 2005 (16)
September 2005 (30)
August 2005 (22)
July 2005 (15)
June 2005 (14)
May 2005 (17)
April 2005 (24)
March 2005 (28)
February 2005 (20)
January 2005 (28)
December 2004 (18)
November 2004 (17)
October 2004 (24)
September 2004 (16)
August 2004 (28)
July 2004 (17)
June 2004 (19)
May 2004 (28)
April 2004 (31)
March 2004 (28)
February 2004 (30)
January 2004 (35)
December 2003 (17)
November 2003 (28)
October 2003 (43)
September 2003 (25)
August 2003 (21)
July 2003 (26)
June 2003 (9)
May 2003 (14)
April 2003 (50)
Books by Brad Abrams
Framework Design Guidelines : Conventions, Idioms, and Patterns for Reusable .NET Libraries
.NET Framework Standard Library Annotated Reference, Volume 2
.NET Framework Standard Library Annotated Reference, Volume 1
Base Class Library Reference Poster
Programming in the .NET Environment
Noteworthy Posts
Who am I?
Code Guidelines
Syndication
RSS 2.0
Atom 1.0