Brad Abrams
Design Guidelines, Managed code and the .NET Framework
August 2004 - Posts
Quiz: Who can access your state?
Without compiling or running this code, can you tell if Malicious will be able to “steal” the password set in an instance of Child? Why or why not? public class Base { protected String _password; } public class Child : Base { public Child ( string password)
Read More...
WinFX: Now Better than Ever
By now you have heard the news : WinFX will be shipping on XP, WS03 in order to make both Longhorn and WinFX ship with higher quality and sooner. If you haven’t already, check out JimAll’s Channel9 interview . Longhorn will contain core-OS level features
Read More...
Properites vs. Fields, this time in databinding
Nikhil fires up the age old debate again… Data-binding to public fields... yes or no?
Read More...
Quiz: More Type Constructors (Answer)
Well, I guess I will not purse my career as a radio game show host. Seems my quiz was not that hard. As most of you said, you change the class to a value type (class => struct). Ah, but the real fun is in the “why”. Richard says, the .cctor emitted
Read More...
The SLAR on System.AttributeUsageAttribute
Boy, it has been a while sense I did one of these… but, never the less, continuing in the series on sharing some of the information in the .NET Framework Standard Library Annotated Reference Vol 1 here are some of the annotations on the System.AttributeUsageAttribute
Read More...
New MSDN TV: Using Managed Resources
BrianGru and Ahmed do a great job… check them out if you are doing anything with the Resource Manager…. Ahmed does a nice, simple demo and Grunk explains the black-art of culture fallback. And even Perf Tips! Using Managed Resources Enjoy!
Read More...
Quiz: More Type Constructors
The program below outputs “in .cctor” when run. In the spirit of NPR’s Says You , make a 6 character change to only line 10 that will allow the program to continue to compile without warnings or errors but when run result in no output. Any of course,
Read More...
BorCon Here I Come!
I will be coming to 2004 Borland Conference in San Jose , CA to talk about the cool new stuff in CLR v2.0. I will be in town for a long weekend to see the sights (any suggestions?). Then hanging out at the conference on 9/14 and 9/15. Anyone else going
Read More...
Pet Peeve #153:Overloading and param names
I have certainly been accused of being an incredible nit-picker when it comes to API designs, but the little a esthetic things do add up. For example consider the overload of the Equals method from System.Uri : public override bool Equals(object comparand);
Read More...
Quiz: Type Constructors (Answer)
Lots of good comments on my little quiz , seems it was too easy, everyone got it right! The first sample (in C# or VB) will print “17”. To see why, check out the ILDASM for the .cctor (which, BTW, is identical in VB and C#): IL_0000: ldc.i4.s 42 IL_0002:
Read More...
Some nitty-gritty info on hosting the CLR
I was blown away last year at the PDC by the number of folks that cared about hosting the CLR in their applications. With Whidbey the story gets even more rich. Dino , the QA guy for CLR hosting, is one of the few that knows how it really works. Today
Read More...
Web Cast on CLR v2.0
This is tomorrow... Webcast: What's New in the CLR 2.0. See you there! Just an announcement all: I'm giving a WebCast tomorrow on MSDN, on the topic of 'What's New In The CLR, 2.0'. This cast is similar to presentations I have given at both PDC and TechEd,
Read More...
Looking for .NET Framework 2.0 Reference Docs
Google wasn’t much help to me finding these docs, but Frank was… I thought I’d share the link with you: .NET Framework 2.0 Reference Docs .
Read More...
Quiz: Type Constructors
Clearly this code should fail a code review but what would calling PrintValue() display ? public class Foo { public static int Value = 42; static Foo () { Value = 17; } public static void PrintValue () { Console .WriteLine(Value); } } Same, question,
Read More...
Grunk on finalizers and StreamWriter
Grunk , a dev on the BCL team , writes the kind of blog entry I love. He is sharing out of his own personal experiences in hopes it saves you time. Google hint: StreamWriter missing data
Read More...
New Design Guideline: Virtual Members
As you might guess from my last few posts , I have been doing some thinking about virtual members. Here are the updated guidelines. Please let me know if you have any questions or comments. As always, you can check out the base design guidelines and my
Read More...
Sorry about the comments...
I am having a little trouble with .Text letting me “approve” comments… I am told the team is working on it. Never fear the comments are not lost, worst case I have them in email… I seem to have managed to turn moderation off (don’t tell the spammers),
Read More...
Even more fun with virtual methods
OK, after the last post I expect many people will nail this, so why don’t you show it your friends that don’t read my blog and see if they pass ;-) Create a new instance of Derived, drop the reference, wait for the GC to collect it, and for any finalizers
Read More...
Quiz: Virtual Methods - Answer!
Well, glad to see many of you got it right, I think FxCop is doing its job! Google helped me find a couple of posts on this already out there: http://weblogs.asp.net/trichards/archive/2003/06/20/9026.aspx http://dotnetjunkies.com/WebLog/mlevison/archive/2004/04/22/11976.aspx
Read More...
Quiz: Virtual Methods
Under what circumstance will the following code print: “ value != 42, what is wrong?” I tested this quiz out on Lutz , his first question was “does it use reflection”… typical from the reflector guy ;-) Anyway, nope, no “funny
Read More...
Pet Peeve #493: Console.WriteLine ("\n")
I know, I know, I am an incredible nit picker, but it gives me the willies to see the hard-coded string “\n” used for newline. It works and there is no real “correctness” argument to be made here, but I just don’t like it. Here are my reasons: 1. Not
Read More...
More fun with call vs callvirt
A while back I posted a little bit about the one implication of call vs. callvirt and the other day I ran into another one that I thought I would share. This one is part of class of issues where C# or VB developers assume that if their language can’t
Read More...
Scott helps us fight back against the comment spammers...
I really hate comment spammers, they really ruin a great forum for the rest of us. I am glad to see that Scott has just armed us with some new weapons to help out. I turned on the comment moderation to test it out and see how it goes. I admit it is a
Read More...
All That Collection Source Code
I noticed that Peter Golde got the first source drop of the PowerCollections posted… Peter is just starting this project, so there is plenty of room for your feedback. In an unrelated note, Peter Sestoft and co just posted a very complete version
Read More...
The SLAR on System.Attribute
Continuing in the series on sharing some of the information in the .NET Framework Standard Library Annotated Reference Vol 1 here are some of the annotations on the System.Attribute class. Brad Abrams The ability to extend the metadata format in a structured
Read More...
Fun with Anonymous Methods
A recent thread over an internal alias really drilled home some details of how Anonymous Methods in C# 2.0 work… If you have the Whidbey Beta you can check it out for yourself, but try to figure it out without running the code… What does this
Read More...
What does "Web" mean?
When you see “Web” what do you think? Does it just mean html over http or is it a global term that covers soap, dime, ftp, even WAIS and gopher ? As you might guess, I am debating about some API naming issues. Thanks for your feedback.
Read More...
Joe on the Microsoft Vocabulary
Joe does a nice job of detailing the MS vocabulary … I never thought using “ask” as a noun was the least bit odd ;-) Anyway, it is good to know that Joe owns getting all the asks scrubbed so we can meet the bar and ship our bits ! Come
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
ManagedExtensibilityFramework
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
September 2008 (3)
August 2008 (11)
July 2008 (7)
June 2008 (13)
May 2008 (7)
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