The only scenario it cannot work is one where you do not end the finally block. The code you show should work just fine and will return null. .NET compilers and will cause a compilation error. the type of a will be considered void in some If the value of the variable is of type T and the return value type is not, a conversion is required in order to avoid the error stated in this answer. If you don’t, the exception is handled and the value of the variable is unchanged. The answer to this question is yes, but only if you also call return (or equivalent) in the finally block. So, yes, your return value is guaranteed to be set to null. If you do not exit the finally block, the exception will be propagated (or the process killed). Since there is no catch in the try block, is my return value guaranteed to be set to null? What happens if I don’t throw on a try catch with a finally and just return NULL? Call Of Duty 4 Modern Warfare English Language Pack DownloadĬall of Duty 4 : Full Game Download file in single link.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |