"This method is called by the infrastructure just after the constructor is
called,
passing in the constructor string. Override this method to make use of the
construction string value."
However, the code as shown raises a compiler error:
" cannot change access modifiers when overriding 'protected' inherited
member 'System.EnterpriseServices.ServicedComponent.Construct(string)"
Anybody maybe can provide insight on this?
// Sample code:
public class Book : ServicedComponent
{
private string mConnString;
public Book()
{
}
// couldn't use override here - change from BETA 2??
public override void Construct(string s)
{
mConnString=s;
}
The problem is not in the override, it's that you maked Construct public,
while it is protected in ServicedComponent. Just change the line above to:
protected override void Construct(string s)
And it should work.
--
Tomas Restrepo
tom...@mvps.org
"Tomas Restrepo [MVP]" <tom...@mvps.org> wrote in message
news:OpLh1H2pBHA.1964@tkmsftngp07...