MSIR.0808 New must be disallowed in Public block to be a Private constructor: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
mNo edit summary
Line 1: Line 1:
A <tt>New</tt> constructor was declared in a <var>Private</var> block but <tt>New</tt> had not been disallowed in the <var>Public</var> block. If the intent is to really have a private New constructor, specify a <tt>Disallow New</tt> in the Public block to let users of the class know that the <tt>new</tt> constructor is not available outside the class. If the <tt>Disallow New</tt> is already in the Public block, make sure the Public block is declared before the Private. If the intent is not to have a private <tt>New</tt> constructor, the constructor declaration should be moved to the Public block.
A <var>New</var> constructor was declared in a <var>Private</var> block but <var>New</var> had not been disallowed in the <var>Public</var> block. If the intent is to really have a private New constructor, specify a <var>Disallow New</var> in the Public block to let users of the class know that the <var>New</var> constructor is not available outside the class. If the <var>Disallow New</var> is already in the Public block, make sure the Public block is declared before the Private. If the intent is not to have a private <var>New</var> constructor, the constructor declaration should be moved to the <var>Public</var> block.


[[Category:Sirius Mods messages]]
[[Category:Sirius Mods messages]]

Revision as of 19:22, 23 April 2014

A New constructor was declared in a Private block but New had not been disallowed in the Public block. If the intent is to really have a private New constructor, specify a Disallow New in the Public block to let users of the class know that the New constructor is not available outside the class. If the Disallow New is already in the Public block, make sure the Public block is declared before the Private. If the intent is not to have a private New constructor, the constructor declaration should be moved to the Public block.