Brad Abrams
Design Guidelines, Managed code and the .NET Framework
April 2003 - Posts
Head cheese at MSDN joines the blog ranks
From the looks of Sara’s comments many of you have already found her site . I have worked with Sara for a long time… she has great passion for developer customers and partners. She had a huge impact of the . NET Framework and as you can see she is having
Read More...
Lutz joins the ranks
Lutz Roeder gets a blog.. Lutz is working a very cool product that uses some of my stuff and a lot of ChrisAn's stuff... He is also author of some very popular .NET tools ... Check it out..
Read More...
Docs on the GC
We had a little thread internally on some good docs on how the GC works... These were the most popular whitepapers... http://msdn.microsoft.com/msdnmag/issues/1100/GCI/default.aspx http://msdn.microsoft.com/msdnmag/issues/1200/GCI2/
Read More...
You don't know till you measure!
If you are serious about getting the best performance possible out of a managed app, you need to be using a profiler. The devs that designed and wrote the CLR still need to use a profiler to judge how to improve the performance of a managed app.. Answer
Read More...
More on String.Empty
Deepak Sharma asks : Where does String.Length == 0 stands in terms of memory efficiency compared to these two methods? Any ideas. I chatted with the Dev lead that owns String… here is his response: Actually, there is no memory effect here. There is always
Read More...
Memory Leaks in Managed code
Q: Can you have memory leaks in managed code? If so, how can you catch them? A: (From the GC Architect) GC will typically reclaim objects at its own pace, based on balancing available memory and runtime overhead. If an assembly is terminated and it is
Read More...
fxcop command line example
I noticed someone hit my site from a google search on this topic. My guess is they didn't find out what they needed, so I thought i'd post a complete answer just in case someone else comes looking for it.. From Michael Fanning the Dev lead for FxCop...
Read More...
More from the Interop Queen
Sonja just told me she had another episode posted... I have not watched it yet, but I am sure it is good. http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20030424NETFXSK/manifest.xml Platform Invoke Tips & Tricks: Memory Ownership and
Read More...
Space Invaders Screen Shot
Chris asks for a picture… finally got it … Long live command line apps!
Read More...
Chris, Chris, Jeff and Jeff
I caught Jeffrey Richter and Chris Sells posing with their doppelgangers the other day on the 4th floor of building 42..
Read More...
Some great stuff published today
Rico is one of the smartest guys on the CLR team and he is super, super passionate about performance. He is looking at everyway possible to make managed code run faster... He just posted a great whitepaper on how the GC works and how to get the best perf
Read More...
A new CLR guy in the house
Please welcome Adam Nathan . Adam is a test lead on the CLR team and knows everything there is to know about interop between managed code and unmanaged code. In fact he even wrote the book on the subject. I am sure you will find his blog a very useful
Read More...
DateTimeFormating
Well, with a lead in like that I could not help but post. This sample comes from a f riend of mine working who is helping me with a little book project... using System; using System.Globalization; namespace Samples { public class DateTimeFormatInfoSample
Read More...
String.Empty vs ""
As David implies , there difference between String.Empty and “” are pretty small, but there is a difference. “” actually creates an object, it will likely be pulled out of the string intern pool, but still… while String.Empty creates no object… so if
Read More...
Assembly/DLL Naming Guidelines
I have not seen this be much of debate externally, but it has been pretty hotly debated internally. We just closed down on this guideline... As always, your comments are welcome: 2.3.4 Assembly/DLL Naming Guidelines An assembly is the unit of deployment
Read More...
Did a short MSDN TV Spot today...
Erica Wiechers from the .NET Show fame came by my office today and shot a short segment for MSDN TV about how the GC works and the Dispose pattern . I thought it went fairly well. I was impressed at how quick it went, it was so easy to get it scheduled
Read More...
Console Magic
I know, I know, you just got your hands on Everett , but I thought I’d start wetting your appetite for Whidbey (the next release of the . NET Framework and Tools)… As I see cool Whidbey demos I’ll let you know about them…. This one really brought back
Read More...
User groups in the Research Triangle Park Area?
I’ll be in North Carolina towards the end of May…. Anyone involved in a user group (or some such) that would like a presentation on what is new in the CLR or just want to chat about how the CLR could be better? I figure I have room for exactly one of
Read More...
Like a breath of fresh air
I can’t believe it, just last week I was pulling great content from internal aliases and posting them here. Now Chris Brumme is actively blogging his OWN stuff and, even better, referring that same internal alias to his public blog. We are starting to
Read More...
On System.Enum and System.ValueType
Yup Shawn has it pretty much right on . Both System.Enum and System.ValueType are themselves reference types. We added them to the system for two primary reasons: 1. We wanted to provide developers an easy way to group all ValueTypes and all Enums in
Read More...
Retrieving the Fusion log
More from the dev that owns the loader... If the exception message isn’t enough for you to determine what the problem is, try getting the Fusion log. It will describe the binding failure (if this is due to an assembly binding failure, instead of a loading
Read More...
Use of AppDomain.Load()
More from inside the walls.. From the dev that owns the loader... AppDomain.Load() is only meant to be called on the current AppDomain (for use by Interop callers). If you call it on a different AppDomain, if the assembly successfully loads in the target
Read More...
Get the hresult from a managed exception
This comes up a lot on internal lists so I thought i'd share... from the FAQ: G et the hresult by calling System.Runtime.InteropServices.Marshal.GetHRForException() on the Exception object. If that info is not readily available, you may need to attach
Read More...
Chris Brumme in the house
Chris is a senior architect on the CLR team... He literally knows how and why everyting in CLR works the way it does. I know he will have great stuff to share... Please take a look! http://blogs.gotdotnet.com/cbrumme/
Read More...
Who's got the locks?
I just had a little fun playing around with SOS today... Here is a bit of mail from a dev on the CLR debugger team that makes this magic happen. If you are running V1.1 then you can use the SOS.dll that is in the Framework\v1.1.4322 folder under a Native
Read More...
Hashtable.Clear thread-safety?
Q: Is it safe for a single writer to call Hashtable.Clear() with multiple concurrent readers? A: (from the developer that owns Hashtable) It depends on what you want. Clear() will not cause a hashtable to be inconsistent state, so hashtable will be not
Read More...
On .NET DJ Reader's Choice
Well, I see Yasser and Ingo' s are linking to their books on .NETDJ Readers' Choice , so I thought I’d join them… I had the pleasure of doing the Libraries chapter and part of the intro for Programming in the .NET Environment . I’d love to hear what people
Read More...
Honest, it doesn't rain all the time..
I wasn’t sure recruiting via blogs was an acceptable thing to do our not, but if Don does it , it must be OK ;-) So here goes…. I have an opening for a Program Manager on my team designing features for the Base Class Libraries and helping me with the
Read More...
Implementing IEnumerable
Hot off the presses... What do you think? ..brad Implementing IEnumerable Almost all collections expose some way to enumerate elements it contains. The IEnumerable interface encapsulates this notion such that common facilities can be built that work on
Read More...
path to the executable
Another one that I have seen come up before... Q: How to find that path to the executable I am running in? A: Assembly.GetExecutingAssembly().Location
Read More...
Strings and IsNullOrEmpty
Jesse aks: >Tired of doing this: "if(s == null || s == String.Empty)"... Yea, we have heard that request before... here is a method we are looking at adding a the Whidbey release of the .NET Framework on the System.String class. public static bool
Read More...
VS 2003 IDE and .NET Framework 1.0
I actually had this question a couple of weeks ago when I was using an RC of VS 2003 to build an application for my wife who only has V1.0 of the Framework on her machine. She doesn't run beta software ;-). So when I saw it come across the internal aliases
Read More...
Implementing ICloneable
I was doing a little work on the Design Guidelines document tonight and I noticed this section that we added recently. I thought I'd post it here for your comments. Where are you using ICloneable today? Do you agree with this suggestion? 1.1 Implementing
Read More...
Why Strong Naming?
More from inside the walls: Q: Does anyone know why we’ve created two ways to sign the components? The certificate form covers all the needs I can see. I wonder why we have a separate “strong naming” manner to do signing that doesn’t cover all the security
Read More...
And the Winner is..
Looks like David Stone one out by under a minute… If John St. Clair had only hit “add” a little faster… David and John both hit the nail on the head.. here is David ’s response: Ø No... because in the second Format method, the format param is "{0}" and
Read More...
Support for /3gb in the CLR
It is true that the CLR in V1.1 does support /3gb memory address space option... Here is a quote from QA person that would know... 1.1 does support /3gb. (to use, mark your images as 3gb aware using imagectl or linker options. The only image that needs
Read More...
Quick C# Quiz
Will this code throw an AgrumentNullException? and why? string firstName = null; String.Format (“{0}”, firstName); Here is the for code String.Format , if that helps… public static String Format(String format, Object arg0) { return Format (null, format,
Read More...
On Dispose
Wallym has some good thoughts on the importance of calling dispose, which reminded me we have a complete whitepaper on how to implement dispose correctly... Love to have your feedback on it. White paper on Dispose
Read More...
More on BCL type names
Jeff read my recent post and suggested I include ALL his reasons for using the BCL name... Here are they are... 1. Devs think there is a difference between String and string or int and Int32 and there isn’t. For example, I’ve run into some people who
Read More...
Always more to learn
I am reviewing some samples for an upcoming reference book. The samples are for classes I know very well. I designed or helped design most of them. But I always have something to learn… Here is one that I thought was pretty cool… prints out the short
Read More...
To use the BCL type names or not?
Jeffrey Richter and I have an on going argument that I thought you’d like to chime in on. In samples, books, etc should we use the BCL type names (Int32, String, Single, etc) or programming language specific type names such as in C# (int, string, float,
Read More...
Conversion Operators
One of my many jobs here at MS is helping out with the .NET Framework Design Guidelines Document. Tonight I had to make a small tweak to a guideline I added last week so I thought while I was in there I would post it here to see if folks had comments.
Read More...
More on Changes for V1.1
We wrote a little program that does a "smart diff" of the .NET Framework... Internally we use it to watch out for breaking changes or making stuff public accidentally . Anyway, here is the output of the tool for V1.0 to V1.1 http://www.gotdotnet.com/team/upgrade/apiChanges.asp
Read More...
AppDomains for sandboxing/robustness
Another internal thread I thought i'd share... Q: I want to sandbox objects of certain types that will be running in my process so that if anything in these objects crashes for any reason, code in the other objects continue to execute. I’m assuming AppDomains
Read More...
Are assignment of 4-byte quantities guaranteed atomic in the CLR?
We had a little thread on this internally today and I thought it interesting enough to share here. I am just experimenting here – is this type of thing useful? Q: If I do simple Int32 assignment to a shared variable in a CLR multi-threaded app, do I need
Read More...
More on the Console form the internet zone
In a commnet on one of my posts , Brad, Guy of .NET asks why we would turn this off. Well, bottom line it is that we can't come up with a meaningful scenario for using the console from semi-trust and there is clearly some level of risk is exposing it.
Read More...
With V1.1 of the Framework shipping
I though i'd post a couple of links I have found useful.. DennisAn wrote a great whitepaper on how to target different runtime versions... http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetdep/html/sidexsidenet.asp And if you want
Read More...
Using Console from the internet zone
Does anyone have a scenario where you are using System.Console from the internet zone? We are trying to understand if we should continue to enable using Console from the internet zone in Whidbey. Are there any scenarios that benefit from using Console
Read More...
The CLI\C# gets ISO blessed
Very cool! ISO has always been the goal... nice to see we made it. http://msnbc-cnet.com.com/2100-1007-995108.html?type=pt&part=msnbc&tag=alert&form=feed&subj=cnetnews
Read More...
Why Blog
Why Blog they ask… I believe that Microsoft has benefited greatly from the enormous community support that is available for the .NET Framework. I have been thinking for a while about how I can best contribute to that community. I spend some time on the
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 (4)
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