! - . . , , . , , , (, ) . !







Visage Role Play - . /adminka , ! http://visage-rp.ru
VK: vk.com/sergey68

76890 - 1000,46860 - 500, 300
** V.I.P --> **

: aka (Async/Await)

1 1 1

  1. #1

    aka (Async/Await)

    ! C#. , . Task.

    Task Class - , , . , Task<TResult> Class.

    async await:
    - async , , - ;
    - await .

    . :
    PHP :
    using System.Threading.Tasks
    await , , , .
    ( async private void):
    PHP :
    private async void button1_Click(object senderEventArgs e
    :
    , :
    PHP :
    var sender as Button;
    b.Enabled false
    :
    PHP :
    await Task.Factory.StartNew((() =>
    {
        
    // 
        //await -    ,    /task
        //Start.New -  /task
        //   
    })); 
    . , b.Enabled = true;, :" : 'button1' , ", , label, : label1.Text = "!";. :
    PHP :
    b.Invoke(new Action(() => //   
    {
        
    b.Enabled true// 
    })); 
    :
    PHP :
    private async void button1_Click(object senderEventArgs e)
    {
        var 
    sender as Button;
        
    b.Enabled false;
        
    await Task.Factory.StartNew((() =>
        {
            
    Task.Delay(1000).Wait(); //  (   )
            
    b.Invoke(new Action(() =>
            {
                
    b.Enabled true;
            }));
        }));

    Invoke:
    PHP :
    private async void button1_Click(object senderEventArgs e)
    {
        
    button1.Enabled false;
        
    await Task.Run((() =>
        {
            
    Task.Delay(1000).Wait(); //  .
        
    }));
          
    button1.Enabled true;

    -, ? ((() => }));
    -- - ...

    : Mathian Developer aka
  2. 1 c :

    execution (12.01.2019)

, : 43

/color, 100, 1000, , , , art, , , , , , , , , , , , php, start, system, text, , ,

(, , , , , ), , .
!
samp-rp advanvce pawn s0beit cs 1.6 0.3x World of Tanks samp-rp, samp-rp, - PAWNO SA-MP IV-MP MTA cleo s0beit sobeit sa-mp sa-mp pawno pawno pawno iv-mp iv-mp iv-mp godfather SAMP gta 4 4 GTA 4 GTA 4 GTA 4 SAMP SAMP Pen1 LS Pen1 Fugitive The Godfather rp roleplay samp-rp sa-mp sa-mp pawno gta-iv gta-v gta-sa gta-3 gta-III gta-4 gta-5 gta-vc mta mta-dm mta-race mta-sa pawno info ru pawno pawno gta-iv gta-iv gta-v gta-v gta-iv keygen gta sa gta 4 multiplayer gta san adnreas multiplayer sa-mp forum sa-mp pawno sa-mp pawno sa-mp gta-sa pawno pawno errors sa-mp 0.3c SA-MP 0.3d 4 GTA 4 GTA 4 GTA 4 SAMP SAMP Pen1 LS Pen1 Fugitive The Godfather SAMP hack rat android instagram twitter ddos root linux ubuntu mac android advance arizona 4g