No, very definitely not. Even if you can do it, it would violate the .NET framework licence. Whether you'd actually be in legal hot water would depend on your country probably, but you'd definitely want to consult a lawyer.
If you're intending on copying the functionality into a new type, then you'd probably have to bring in a load of other internal types and potentially other oddities. Just how much Microsoft code do you want to have to copy? Then you've got problems if the original type is updated in a new release, etc...
Just don't do it - ask a separate question for how to work around whatever deficiency you've run into, but don't start taking the framework code and putting a modified version into your own code base.
EDIT: I originally thought Joan was talking about modifying the code, rebuilding, and then replacing the BCL class in the framework. Here were my thoughts on that idea...
It's a really bad idea for technical reasons though:
- You wouldn't be able to sign the assembly properly again, meaning that at best you could only run apps under full trust (which I don't think checks assembly signatures).
- How would you deploy your new type? You'd quite possibly have to deploy it "over the top" of the real one, which would affect anyone else using .NET.
BCL types just aren't designed to be replaced like this.