c# - The modifier 'new' is not valid for this item -
i created class groupprincipalextension : groupprincipal
can see inherits system.directoryservices.accountmanagement.groupprincipal
now when try create constructor in extension class,
public new groupprincipalextension() { //do }
i error,
the modifier 'new' not valid item
based on read, can add own constructors derived class or without 'new' keyword
edit
if remove new keyword:
'system.directoryservices.accountmanagement.groupprincipal' not contain constructor takes 0 arguments
remove new
constructor , should work. declare new
keyword when you're creating instance.
also since inherits class might want declare this:
public groupprincipalextension() : base() // parameters ?? { //do }
Comments
Post a Comment