Amazon.com Widgets August, 2004 - Brad Abrams - Site Home - MSDN Blogs

Brad Abrams

Design Guidelines, Managed code and the .NET Framework

August, 2004

  • Brad Abrams

    Pet Peeve #493: Console.WriteLine ("\n")

    • 46 Comments
    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...
  • Brad Abrams

    New Design Guideline: Virtual Members

    • 16 Comments
    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...
  • Brad Abrams

    Fun with Anonymous Methods

    • 24 Comments
    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...
  • Brad Abrams

    What does "Web" mean?

    • 34 Comments
    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...
  • Brad Abrams

    WinFX: Now Better than Ever

    • 25 Comments
    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...
  • Brad Abrams

    More fun with call vs callvirt

    • 10 Comments
    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...
  • Brad Abrams

    Quiz: Virtual Methods - Answer!

    • 12 Comments
    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...
  • Brad Abrams

    Quiz: Who can access your state?

    • 52 Comments
    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...
  • Brad Abrams

    Even more fun with virtual methods

    • 46 Comments
    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...
  • Brad Abrams

    Quiz: Virtual Methods

    • 16 Comments
    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...
  • Brad Abrams

    BorCon Here I Come!

    • 11 Comments
    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...
  • Brad Abrams

    Properites vs. Fields, this time in databinding

    • 8 Comments
    Nikhil fires up the age old debate again… Data-binding to public fields... yes or no?
  • Brad Abrams

    Quiz: More Type Constructors

    • 12 Comments
    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,...
  • Brad Abrams

    Quiz: Type Constructors

    • 15 Comments
    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,...
  • Brad Abrams

    Pet Peeve #153:Overloading and param names

    • 13 Comments
    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...
  • Brad Abrams

    Some nitty-gritty info on hosting the CLR

    • 3 Comments
    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...
  • Brad Abrams

    Scott helps us fight back against the comment spammers...

    • 4 Comments
    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...
  • Brad Abrams

    Looking for .NET Framework 2.0 Reference Docs

    • 0 Comments
    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 .
  • Brad Abrams

    The SLAR on System.AttributeUsageAttribute

    • 7 Comments
    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...
  • Brad Abrams

    Quiz: Type Constructors (Answer)

    • 1 Comments
    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...
  • Brad Abrams

    Quiz: More Type Constructors (Answer)

    • 0 Comments
    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...
  • Brad Abrams

    All That Collection Source Code

    • 2 Comments
    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...
  • Brad Abrams

    Joe on the Microsoft Vocabulary

    • 5 Comments
    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 ! ...
  • Brad Abrams

    The SLAR on System.Attribute

    • 1 Comments
    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...
  • Brad Abrams

    Grunk on finalizers and StreamWriter

    • 1 Comments
    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
Page 1 of 2 (28 items) 12