Skip links

Metodla birden fazla değer geri döndürme (otomatik container)


Notice: Trying to access array offset on value of type bool in /var/www/vhosts/dmrbt.com/httpdocs/wp-content/themes/boo/rella/extensions/aq_resizer/aq_resizer.php on line 117

Notice: Trying to access array offset on value of type bool in /var/www/vhosts/dmrbt.com/httpdocs/wp-content/themes/boo/rella/extensions/aq_resizer/aq_resizer.php on line 118

Notice: Trying to access array offset on value of type bool in /var/www/vhosts/dmrbt.com/httpdocs/wp-content/themes/boo/rella/extensions/aq_resizer/aq_resizer.php on line 117

Notice: Trying to access array offset on value of type bool in /var/www/vhosts/dmrbt.com/httpdocs/wp-content/themes/boo/rella/extensions/aq_resizer/aq_resizer.php on line 118
Metodla birden fazla değer geri döndürme (otomatik container)
Merhaba
Köşeli parantez kullanarak container tipi verilerini otomatik oluşturmak mümkün olmakta.
Oldukça pratik bir yöntem.
void metod1()
{
    AmountMST   balance;
AmountMST   orderBalance;
;
   [balance, orderBalance] = this.metod2();
}
container metod2()
{
    AmountMST   balance;
AmountMST   orderBalance;
;
//hesaplamalar
    return [balance, orderBalance];
}

Join the Discussion