<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>perform a wait, like if you would like to show a notification for a while then hide the notification</Title>
      <Shortcut>performawait,likeifyouwouldliketoshowanotificationforawhilethenhidethenotification</Shortcut>
      <Description>perform a wait, like if you would like to show a notification for a while then hide the notification [C#]</Description>
      <Author>Waleed Al-Hezam</Author>
      <HelpUrl>/PreviewSnippet.aspx?SnippetID=98129d27-0598-4f61-bbc2-875faf6090f6</HelpUrl>
      <SnippetTypes>
        <SnippetType>SurroundsWith</SnippetType>
      </SnippetTypes>
    </Header>
    <Snippet>
      <Code Language="csharp"><![CDATA[private Timer t = new Timer();
        void  Event_Trigger(object sender, EventArgs e)
        {               
            t.Interval = 4000;
            t.Tick +=new EventHandler(t_Tick);
           ShowNotificationForm();
            t.Start();
           
            
        }
        void t_Tick(object sender, EventArgs e)
        {
           CloseNotificationForm();
            t.Stop();
            
t.Dispose();           
        }
        
       private void ShowNotificationForm()
        {
             //do or show something
        }
       private void CloseNotificationForm()
        {
             //End your work here
        }]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>