MSIR.0808 New must be disallowed in Public block to be a Private constructor

From m204wiki
Revision as of 15:01, 9 November 2010 by 198.242.244.47 (talk) (Created page with "A <tt>New</tt> constructor was declared in a <tt>Private</tt> block but <tt>New</tt> had not been disallowed in the <tt>Public</tt> block. If the intent is to really have a priva...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.