Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' Gambas class file
- Property nombre As String
- Private hnombre As String
- Property SueldoMensual As String
- Private hsueldoMensual As Single
- '------------------- lectura y escritura de valores de propiedades -------------
- Private Function nombre_Read() As String
- Return hnombre
- End
- Private Sub nombre_Write(Value As String)
- hnombre = value
- End
- Private Function SueldoMensual_Read() As String
- Return hsueldoMensual
- End
- Private Sub SueldoMensual_Write(Value As String)
- hsueldoMensual = value
- End
- '------------------- Metodos -------------
- Public Sub Consultar()
- Print "Consultar datos...."
- Print "Nombre: " & hnombre
- Print "Sueldo: "; sueldo()
- Print "----------------------------"
- End
- Public Function Sueldo() As String
- Return "El sueldo de una persona es de " & Str$(hsueldoMensual) & " €."
- End
- Public Sub Registrar(nombre As String, sueldo As Single, Optional valor1 As Variant, Optional valor2 As Variant) 'nombre As String, sueldo As Single)
- hnombre = nombre
- hsueldoMensual = sueldo
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement