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

Brad Abrams

Design Guidelines, Managed code and the .NET Framework

October, 2004

  • Brad Abrams

    Brian Harry on the CLR

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

    Color-Coded Source code in blogs

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

    Quiz: Initializing static fields correctly

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

    Quiz: Instantiating an interface

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

    The Good and the Bad: Obsoletion in the Framework

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

    Generics and the special constraints

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

    How to find if the logged user is a admin or not?

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

    Whidbey Readiness Quiz: Converting array values

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

    Whidbey Readiness Quiz: More on arrays

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

    Answer: Instantiating an interface

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

    Quiz: Delegates and private methods

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

    Answer: More Exception Mysteries

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

    The SLAR on System.Byte

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

    XPSP2 and home wireless network: A confession and the joy...

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

    Answer: Initializing static fields correctly

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

    Whidbey Readiness Quiz (Answer): Converting array values

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

    On shipping...

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

    Off to Saint Louis...

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

    I'll take even the smallest evidence of success

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

    Quiz: More Exception Mysteries

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

    Perf Tips for Library developers

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

    Feedback on collection Interfaces

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

    New Design Guideline: Be consistent in naming parameters when overloading, overriding and implementing interfaces

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

    The SLAR gets a review...

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

    Obsolete Members in Whidbey Beta1

    • 2 Comments
    namespace Microsoft.CSharp { [Obsolete( "Use Microsoft.CSharp.CSharpCodeProvider, System.CodeDom.Compiler.ICodeCompiler, and System.CodeDom.Compiler.CompilerError instead. http://go.microsoft.com/fwlink/?linkid=14202" )] public class Compiler { } [Obsolete...
Page 1 of 1 (25 items)