abstract class

  • Thread starter Thread starter Peter Morris
  • Start date Start date
P

Peter Morris

If I have a abstract class with some field what is the best way
to set these fields. It can't be done by using the constructor
because an abstract class doesn't have any constructor.

An abstract class may have constructors.



--
Pete
=========================================
I use Enterprise Core Objects (Domain driven design)
http://www.capableobjects.com/
=========================================
 
Hello!

If I have a abstract class with some field what is the best way
to set these fields. It can't be done by using the constructor
because an abstract class doesn't have any constructor.


//Tony
 
Hello!

If I have a abstract class with some field what is the best way
to set these fields. It can't be done by using the constructor
because an abstract class doesn't have any constructor.

//Tony

Instantiate the object that extends this abstract class and init the
value...
 
True, but it can not be instantiated.

That's irrelevant, he wants to set some member values from constructor
parameters not create an instance.


--
Pete
=========================================
I use Enterprise Core Objects (Domain driven design)
http://www.capableobjects.com/
=========================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top