you an use the following code block and modify
static Subject<int> subject = new Subject<int>();
// First subscriber
subject.Subscribe((e) => {
Console.WriteLine($"Subscriber 1 received value: {e}");
});
// Second subscriber
subject.Subscribe((e) => {
Console.WriteLine($"Subscriber 2 received value: {e}");
});
// Publish a value
subject.OnNext(1);