Hi..
I have problem using class that use IMPLEMENTS. If i create a new class having interface from other class. The problem is I can't add a new public property or method in it. New property that i write didn't recognized by the instance object.

For example:
I have Interface Class called IHuman, have 3 Properties:
- Name
- DateBirth
- Sex
My Code for Interface Class IHuman:
VB Code:
  1. Public Property Get Name as string
  2. End Property
  3. Public Property Let Name(Byval sData as string)
  4. End Property
  5.  
  6. Public Property Get DateBirth as Date
  7. End Property
  8. Public Property Let DateBirth(Byval dData as Date)
  9. End Property
  10.  
  11. Public Property Get Sex as Integer
  12. End Property
  13. Public Property Let Sex(Byval iData as integer)
  14. End Property
Then I wrote another class called CEmploye that implements IHuman. Beside Name, DateBirth and Sex, i need new property named Salary.
My Code for Class CEmploye:
VB Code:
  1. Implements IHuman
  2.  
  3. Public Property Get Salary as double
  4. End Property
  5. Public Property Let Salary(Byval uData as double)
  6. End Property
My Form's code:
VB Code:
  1. Private Sub Form_Load()
  2.     Dim oEmp as IHuman
  3.     Set oEmp as New CEmploye
  4.  
  5.     oEmp.Name = "Mike"
  6.     oEmp.Sex=0
  7.     oEmp.Salary = 1000   '<--error here
  8. End Sub
Is there any solution(s) to add new method or property to this kind of class ?

Best Regards,
- jude -