Sometimes the code is handy, and you use anonymous stuff.
1. Anonymous Events
Args. Cookiegot + = (s, e) = =
{
This. Isweblogon = true;
};
Do not write the method specifically, of course, this way of introduction to use.
2. Anonymous objects
var ohlist = Ohmanager.getlist (). Select (x = new {x.id, x.name,x.createtime});
User interface or front and back interaction, specify certain fields, and new objects, no longer need to build entities.
3. Anonymous form Thread
This. Invoke (new Action () =
{
Btc38imageform form = new Btc38imageform ();
Form. ShowDialog ();
}));
Prevents the main form from affecting, not the card.
4. Anonymous thread
Thread t = new Thread (() =
{
Runing ();
});
T.isbackground = true;//program closed, thread closed
T.start ();
5. Anonymous Timer
Timer = new System.Timers.Timer (1 * 1000);
Timer. Elapsed + = (s, e) = = {
D1. Runing ();
D15. Runing ();
};
Timer. AutoReset = true;
Timer. Enabled = true;
Timer. Start ();
Similar to anonymous events.
Experience summary 36--c# Anonymous (event, object ...) )