CannibalSmith ([info]cannibalsmith) rakstīja [info]koderi kopienā,
@ 2008-10-21 14:23:00

Previous Entry  Add to memories!  Tell a Friend!  Next Entry
C# try bloki
Kāda ir atšķirība starp
try { A(); } catch (Exception) { B(); } finally { C(); }
un
try { A(); } catch (Exception) { B(); } C();
?


(Lasīt komentārus) - (Ierakstīt jaunu komentāru)


[info]cannibalsmith
2008-10-21 14:57 (saite)
Kāpēc varētu neizpildīties?

(Atbildēt uz šo) (Iepriekšējais) (Diskusija)


[info]zverj
2008-10-21 15:02 (saite)
ja iekš catch taisi throw new exception

(Atbildēt uz šo) (Iepriekšējais) (Diskusija)


[info]cannibalsmith
2008-10-21 15:06 (saite)
Paldies.

(Atbildēt uz šo) (Iepriekšējais)


[info]mindbound
2008-10-21 15:03 (saite)
Whereas catch is used to handle exceptions that occur in a statement block, finally is used to guarantee a statement block of code executes regardless of how the preceding try block is exited.

(Atbildēt uz šo) (Iepriekšējais)


[info]watt
2008-10-21 15:04 (saite)
neko nesaku, bet kas notiek ja B() izmet exceptionu?

(Atbildēt uz šo) (Iepriekšējais)


(Lasīt komentārus) -

Neesi iežurnalējies. Iežurnalēties?