T
Theo Bebekis
Hi there
Every time I create a new Form in the VS 2003 IDE
i see the following entry
private System.ComponentModel.Container components = null;
which constantly remains null, when I add
controls (say a Button) or components (say Timer)
on the Form.
The protected Dispose() checks
if (components != null)
which always returns false.
Questions:
1. Where and when that private "components" field is used?
2. If it is always null
a. can I delete it safely?
b. why I don't see any compiler warning?
Also, that same declaration
private System.ComponentModel.Container components = null;
is done by the IDE when I create a new Component or CustomControl
file. But I don't intend to use it. Do I really need it?
Best regards
Theo
Every time I create a new Form in the VS 2003 IDE
i see the following entry
private System.ComponentModel.Container components = null;
which constantly remains null, when I add
controls (say a Button) or components (say Timer)
on the Form.
The protected Dispose() checks
if (components != null)
which always returns false.
Questions:
1. Where and when that private "components" field is used?
2. If it is always null
a. can I delete it safely?
b. why I don't see any compiler warning?
Also, that same declaration
private System.ComponentModel.Container components = null;
is done by the IDE when I create a new Component or CustomControl
file. But I don't intend to use it. Do I really need it?
Best regards
Theo