Amazon.com Widgets

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...
Posted 29 October 04 08:25 by BradA | 20 Comments   
Filed under
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...
Posted 28 October 04 10:20 by BradA | 0 Comments   
Filed under
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...
Posted 27 October 04 10:09 by BradA | 8 Comments   
Filed under
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...
Posted 26 October 04 11:30 by BradA | 4 Comments   
Filed under
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...
Posted 26 October 04 08:04 by BradA | 22 Comments   
Filed under
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...
Posted 24 October 04 11:15 by BradA | 7 Comments   
Filed under
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...
Posted 24 October 04 08:14 by BradA | 6 Comments   
Filed under
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...
Posted 21 October 04 07:59 by BradA | 12 Comments   
Filed under
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...
Posted 15 October 04 11:37 by BradA | 1 Comments   
Filed under
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...
Posted 12 October 04 08:45 by BradA | 1 Comments   
Filed under
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...
Posted 11 October 04 08:14 by BradA | 2 Comments   
Filed under
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...
Posted 11 October 04 07:19 by BradA | 10 Comments   
Filed under
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...
Posted 10 October 04 04:41 by BradA | 12 Comments   
Filed under
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...
Posted 08 October 04 01:38 by BradA | 1 Comments   
Filed under
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...
Posted 08 October 04 10:54 by BradA | 39 Comments   
Filed under
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...
Posted 06 October 04 09:23 by BradA | 4 Comments   
Filed under
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...
Posted 05 October 04 09:50 by BradA | 20 Comments   
Filed under
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...
Posted 05 October 04 09:02 by BradA | 34 Comments   
Filed under
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...
Posted 04 October 04 08:52 by BradA | 13 Comments   
Filed under
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...
Posted 04 October 04 08:28 by BradA | 7 Comments   
Filed under
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...
Posted 04 October 04 03:24 by BradA | 2 Comments   
Filed under
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...
Posted 03 October 04 02:38 by BradA | 16 Comments   
Filed under
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...
Posted 01 October 04 05:22 by BradA | 11 Comments   
Filed under

Search

Go

This Blog

Syndication

Page view tracker