1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
<Type Name="ElapsedEventHandler" FullName="System.Timers.ElapsedEventHandler">
<TypeSignature Language="C#" Maintainer="auto" Value="public delegate void ElapsedEventHandler(object sender, ElapsedEventArgs e);" />
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00]</AssemblyPublicKey>
<AssemblyVersion>1.0.3300.0</AssemblyVersion>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
<Base>
<BaseTypeName>System.Delegate</BaseTypeName>
</Base>
<Docs>
<param name="sender">To be added.</param>
<param name="e">To be added.</param>
<summary>
<para>Identifies the method that will be executed when the <see cref="E:System.Timers.Timer.Elapsed" /> event fires.</para>
</summary>
<remarks>
<para>Use this delegate to attach handlers to the <see cref="E:System.Timers.Timer.Elapsed" /> event.</para>
<example>
<code lang="C#">
using System;
using System.Timers;
public class TimerExample
{
private static System.Timers.Timer ourTimer;
public static void Main()
{
ourTimer = new System.Timers.Timer();
// attach to the Elapsed event.
ourTimer.Elapsed += new ElapsedEventHandler(OnTimerElapsed);
// make our timer interval 1 second
ourTimer.Interval = 1000;
// don't forget to enable the timer!
// we could also call ourTimer.Start() here; they both have the same effect
// (starting the timer).
ourTimer.Enabled = true;
Console.WriteLine("Waiting 10 seconds before exit...");
System.Threading.Thread.Sleep(10000);
}
private static void OnTimerElapsed(object sender, ElapsedEventArgs e)
{
Console.WriteLine("Timer elapsed at: " + e.SignalTime.ToLongTimeString());
}
}
</code>
</example>
</remarks>
</Docs>
<Members />
<Parameters>
<Parameter Name="sender" Type="System.Object" />
<Parameter Name="e" Type="System.Timers.ElapsedEventArgs" />
</Parameters>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
</Type>
|