What is the difference between a property,method & event ?(දන්න එකෙක් කියපන්)

Nohim Ys

Well-known member
  • What is the difference between a property,method & event ?(දන්න එකෙක් කියපන්)

    දන්න එවුන් කියපන් මේක හරිද කියලා මචං...
    මම මේ Google Search කරලා හොයාගත්ත එකක් :):)



    Object has three characteristics
    and these are
    1.Property
    2.Method
    3.Event

    Property represents (data) characteristic of an object..

    Method represents the behavior(action)performed by an object..

    Event is msg sent by an object to signal an activity


    Example:-

    For a class Employee
    FirstName,LastName,Salary <------ Properties
    Hire,Promote <------ Methods
    On hire, On promote <------ Events

     

    Nohim Ys

    Well-known member
  • event is a action that can trigger method(s) of an object as i understand

    Yes machan. That also should be correct. A event reacts to a certain action. Just like button_Click.
    Machan,but is the codes for the events also implemented inside the class ? Or the event has the ability to use objects in the certain event ? do u know ?


    ahh ow bn. isuru kiyanne EK ekeda? :nerd: me paranam kela wei wage bn :rofl:

    ow uo thamai... Aulak na, karagena palayan bn ;);)
     

    thilina91

    Member
    May 28, 2008
    18,560
    858
    0
    New World, Grand Line
    Machan,but is the codes for the events also implemented inside the class ? Or the event has the ability to use objects in the certain event ? do u know ?

    na neh.
    events just call functions or do something

    ( showing a message box for a button click event, calling display function in linked list class for a button click event)

    apita ST wala nam thiyenne event ekakata react karanna code liyanna witharai ne.

    ow uo thamai... Aulak na, karagena palayan bn ;);)

    ela ela :D
     
    Last edited:

    Nohim Ys

    Well-known member