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

  • audivila

    audivila

    5 HAZİRAN 2009
  • Lin Steven

    Lin Steven

    17 EKİM 2006
  • Chaîne de TheMoustic

    Chaîne de T

    5 Kasım 2006