Clarify how InitializeComponent works in the template comment#1435
Clarify how InitializeComponent works in the template comment#1435dmachaj merged 1 commit intomicrosoft:masterfrom
Conversation
|
As a suggestion, this pattern is also useful for cases where you need to subscribe to callbacks or produce weak references to hand out. It is usually unsafe to do that during construction but it is safe after the constructor has completed without throwing. |
That's a good callout. In an ideal world, I think it'd be good if the documentation covered that stuff, but I don't think it does. I'd offer to update it myself, but I think that may be an exercise better left to someone with more familiarity with the subject matter. |
The default template describes what not to do with
InitializeComponent, but it doesn't describe how developers are supposed to interact with it. This change clarifies the comment so it's more obvious why the link is relevant to the developer.