SORU
22 NİSAN 2010, PERŞEMBE


Catch blok döndürür?

. Catch bloğu içinde bir return ifadesi olması yanlış mı? Alternatifler nelerdir?
ben.e:

public bool SomeFunction()
{
    try
    {
        //somecode
        return true;
    }
    catch(Exception ex)
    {
        MessageBox.Show(ex.message);
        return false;
    }

}

CEVAP
22 NİSAN 2010, PERŞEMBE


Normalde catch blok döndürür. Normalde iyi bir fonksiyonel kod.

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • HereWeStayKings

    HereWeStayKi

    3 NİSAN 2013
  • infodirt

    infodirt

    11 Mart 2009
  • Random Act of Kindness Video Contest

    Random Act o

    18 EYLÜL 2012