Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MyClass
- {
- //Custom type Event declaration
- public event EventHandler<Mas4TEventArgs> Info;
- decimal _weigh;
- //properties
- public string Id { get; set; }
- public decimal Weigh
- {
- get { return this._weigh; }
- set //When this property is changed, invoke Info Event, passing Id property to be shown on messagebox.
- {
- this._weigh= value;
- Info?.Invoke(this, new Mas4TEventArgs(this.Id));
- }
- }
- }
Add Comment
Please, Sign In to add comment