Subscribe to Delegate with 2 Int Parameters for a Windows 10 UWP project.

var o = Observable.FromEvent<OnNumberChangedEventHandler, Tuple<int, int>>(
    a => (i1, i2) => a(Tuple.Create(i1, i2)), 
    h => _calculator.OnNumberChanged += h,
    h => _calculator.OnNumberChanged -= h
); //o is type IObservable<Tuple<int, int>>

2 COMMENTS

    • In object-oriented programming, delegation refers to evaluating a member (property or method) of one object (the receiver) in the context of another, original object

LEAVE A REPLY

Please enter your comment!
Please enter your name here