Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID
Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.

Difference between categories and inheritance??

prudhviprudhvi Posts: 41Registered Users
hi everyone,can anyone tell me the difference between categories and inheritance..categories are used to add the functionality to the existing class,but we can also do that using inheritance..then what is the use of categories..i searched this in google..but not got a satisfied answer..Thanks in advance..
Post edited by prudhvi on

Replies

  • DomeleDomele Posts: 2,948Registered Users
    Subclassing will create a new class where the method exists. With categories, you can add a method to an existing class and use that class.
    If you are looking for a quality developer, I'm your man. Give me a PM if you are interested.



    New app - See screenshots and details at www.globaclock.com.



    If you want to
  • assistmanassistman Posts: 1New Users
    prudhvi;329161 said:
    hi everyone,can anyone tell me the difference between categories and inheritance..categories are used to add the functionality to the existing class,but we can also do that using inheritance..then what is the use of categories..i searched this in google..but not got a satisfied answer..Thanks in advance..
    You use category to change the current class. All instances of that class you create after adding a category would implement the category method(s). So you actually lose access to the "old" class.
Sign In or Register to comment.