问题
Is it possible to add a Finalizer to a CodeDom generated class (other than using CodeSnippetTypeMember)?
I couldn't find any information about it on MSDN.
回答1:
This was a known bug in .NET Framework and was reported some time back at http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?feedbackId=FDBK48431
But the link above is currently not working. You can view it using internet archive on the following link http://web.archive.org/web/20080224200911rn_2/connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=97599
I am not sure whether it was fixed or not.
来源:https://stackoverflow.com/questions/2221385/finalizer-with-codedom