AbstractToYield.Publisher.DoSomething C# (CSharp) Method

DoSomething() public method

public DoSomething ( ) : void
return void
        public void DoSomething()
        {
            // Write some code that does something useful here
            // then raise the event. You can also raise an event
            // before you execute a block of code.
            OnRaiseCustomEvent(new CustomEventArgs("Did something"));
        }

Usage Example

Example #1
0
        static void Main(string[] args)
        {
            Publisher  pub  = new Publisher();
            Subscriber sub1 = new Subscriber("sub1", pub);
            Subscriber sub2 = new Subscriber("sub2", pub);

            // Call the method that raises the event.
            pub.DoSomething();

            // Keep the console window open
            Console.WriteLine("Press Enter to close this window.");
            Console.ReadLine();
        }
All Usage Examples Of AbstractToYield.Publisher::DoSomething