CannibalSmith ([info]cannibalsmith) rakstīja [info]koderi kopienā,
@ 2009-03-16 13:47:00

Previous Entry  Add to memories!  Tell a Friend!  Next Entry
.net delegāti
Kāpēc visi raksta tā
class HaHa
{
	delegate void GlugGlug();
public:
	void Zomg()
	{
		dispatcher->Invoke(DispatcherPriority::Normal, gcnew GlugGlug(this, &HaHa::Pooper));
		dispatcher->Invoke(DispatcherPriority::Normal, gcnew GlugGlug(this, &HaHa::Pirate));
	}
	void Pooper() { }
	void Pirate() { }
}
nevis šitā
class HaHa
{
	delegate void GlugGlug();
	GlugGlug^ glug;
	GlugGlug^ zomg;
public:
	HaHa()
	{
		glug = gcnew GlugGlug(this, &HaHa::Pooper);
		zomg = gcnew GlugGlug(this, &HaHa::Pirate);
	}
	void Zomg()
	{
		dispatcher->Invoke(DispatcherPriority::Normal, glug);
		dispatcher->Invoke(DispatcherPriority::Normal, zomg);
	}
	void Pooper() { }
	void Pirate() { }
}
?


(Lasīt komentārus)

Nopūsties:

No:
Lietotājvārds:
Parole:
Ievadi te 'qws' (liidzeklis pret spambotiem):
Temats:
Tematā HTML ir aizliegts
  
Ziņa:

Gandrīz jau aizmirsu pateikt – šis lietotājs ir ieslēdzis IP adrešu noglabāšanu. Operatore Nr. 65.
Neesi iežurnalējies. Iežurnalēties?