Guest User

Untitled

a guest
Jun 23rd, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. public class MyClass
  2. {
  3. //Custom type Event declaration
  4. public event EventHandler<Mas4TEventArgs> Info;
  5. decimal _weigh;
  6. //properties
  7. public string Id { get; set; }
  8. public decimal Weigh
  9. {
  10. get { return this._weigh; }
  11. set //When this property is changed, invoke Info Event, passing Id property to be shown on messagebox.
  12. {
  13. this._weigh= value;
  14. Info?.Invoke(this, new Mas4TEventArgs(this.Id));
  15. }
  16. }
  17. }
Add Comment
Please, Sign In to add comment