[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"me":3,"catalog:en:backend\u002Fcsharp-exceptions":4,"config":254},null,{"field_key":5,"field_name":6,"seniority":7,"topic_key":8,"topic_name":9,"spec_key":7,"spec_name":7,"locale":10,"cell_total":11,"field_total":12,"seniorities":13,"topics":17,"specs":148,"samples":168},"backend","Backend","","csharp-exceptions","Csharp Exceptions","en",75,3300,[14,15,16],"junior","mid","senior",[18,21,24,27,30,31,34,37,40,43,46,49,52,55,58,61,64,67,70,73,76,79,82,85,88,91,94,97,100,103,106,109,112,115,118,121,124,127,130,133,136,139,142,145],{"key":19,"name":20,"count":11},"api-design","API Design",{"key":22,"name":23,"count":11},"caching","Caching",{"key":25,"name":26,"count":11},"concurrency","Concurrency",{"key":28,"name":29,"count":11},"csharp-concurrency-async","Csharp Concurrency Async",{"key":8,"name":9,"count":11},{"key":32,"name":33,"count":11},"csharp-generics-interfaces","Csharp Generics Interfaces",{"key":35,"name":36,"count":11},"csharp-memory-performance","Csharp Memory Performance",{"key":38,"name":39,"count":11},"csharp-stdlib-http","Csharp Stdlib Http",{"key":41,"name":42,"count":11},"csharp-testing-tooling","Csharp Testing Tooling",{"key":44,"name":45,"count":11},"databases-sql","Databases \u002F SQL",{"key":47,"name":48,"count":11},"go-concurrency","Go Concurrency",{"key":50,"name":51,"count":11},"go-errors","Go Errors",{"key":53,"name":54,"count":11},"go-interfaces-generics","Go Interfaces Generics",{"key":56,"name":57,"count":11},"go-memory-performance","Go Memory Performance",{"key":59,"name":60,"count":11},"go-stdlib-http","Go Stdlib Http",{"key":62,"name":63,"count":11},"go-testing-tooling","Go Testing Tooling",{"key":65,"name":66,"count":11},"java-concurrency","Java Concurrency",{"key":68,"name":69,"count":11},"java-exceptions","Java Exceptions",{"key":71,"name":72,"count":11},"java-generics-interfaces","Java Generics Interfaces",{"key":74,"name":75,"count":11},"java-memory-jvm","Java Memory Jvm",{"key":77,"name":78,"count":11},"java-stdlib-http","Java Stdlib Http",{"key":80,"name":81,"count":11},"java-testing-tooling","Java Testing Tooling",{"key":83,"name":84,"count":11},"messaging-queues","Messaging \u002F Queues",{"key":86,"name":87,"count":11},"networking-http","Networking \u002F HTTP",{"key":89,"name":90,"count":11},"nodejs-error-handling","Nodejs Error Handling",{"key":92,"name":93,"count":11},"nodejs-event-loop-async","Nodejs Event Loop Async",{"key":95,"name":96,"count":11},"nodejs-memory-performance","Nodejs Memory Performance",{"key":98,"name":99,"count":11},"nodejs-modules-streams","Nodejs Modules Streams",{"key":101,"name":102,"count":11},"nodejs-stdlib-http","Nodejs Stdlib Http",{"key":104,"name":105,"count":11},"nodejs-testing-tooling","Nodejs Testing Tooling",{"key":107,"name":108,"count":11},"php-concurrency-async","Php Concurrency Async",{"key":110,"name":111,"count":11},"php-exceptions","Php Exceptions",{"key":113,"name":114,"count":11},"php-generics-interfaces","Php Generics Interfaces",{"key":116,"name":117,"count":11},"php-memory-performance","Php Memory Performance",{"key":119,"name":120,"count":11},"php-stdlib-http","Php Stdlib Http",{"key":122,"name":123,"count":11},"php-testing-tooling","Php Testing Tooling",{"key":125,"name":126,"count":11},"python-concurrency-async","Python Concurrency Async",{"key":128,"name":129,"count":11},"python-errors-context","Python Errors Context",{"key":131,"name":132,"count":11},"python-memory-performance","Python Memory Performance",{"key":134,"name":135,"count":11},"python-stdlib-http","Python Stdlib Http",{"key":137,"name":138,"count":11},"python-testing-tooling","Python Testing Tooling",{"key":140,"name":141,"count":11},"python-typing-oop","Python Typing Oop",{"key":143,"name":144,"count":11},"security","Security",{"key":146,"name":147,"count":11},"testing","Testing",[149,153,156,159,162,165],{"key":150,"name":151,"count":152},"csharp","C#\u002F.NET",450,{"key":154,"name":155,"count":152},"go","Go",{"key":157,"name":158,"count":152},"java","Java",{"key":160,"name":161,"count":152},"nodejs","Node.js",{"key":163,"name":164,"count":152},"php","PHP",{"key":166,"name":167,"count":152},"python","Python",[169,187,201,214,227,240],{"id":170,"topic":9,"difficulty":171,"body":172,"options":173,"correct_key":178,"explanation":186},"019f70e2-e7f3-7583-8540-d2c9bdc4d0fe",1,"```csharp\ntry\n{\n    Console.WriteLine(\"A\");\n    throw new InvalidOperationException();\n}\nfinally\n{\n    Console.WriteLine(\"B\");\n}\n```\nWhat is printed before the exception propagates out of this code block (assuming nothing catches it further up)?",[174,177,180,183],{"key":175,"text":176},"a","B then A",{"key":178,"text":179},"b","A then B",{"key":181,"text":182},"c","Only A (finally is skipped since no catch)",{"key":184,"text":185},"d","Only B (A is buffered and lost since exception was thrown)","The try block runs first, printing \"A\", then throws. Before the exception can propagate further up the call stack, the finally block always runs, printing \"B\". Only after that does the exception continue propagating.",{"id":188,"topic":9,"difficulty":189,"body":190,"options":191,"correct_key":184,"explanation":200},"019f70e2-e7f6-766d-b7d3-eea6d3a3da4e",2,"```csharp\ntry\n{\n    File.ReadAllText(\"data.txt\");\n}\ncatch (Exception e)\n{\n    Console.WriteLine(\"generic: \" + e.Message);\n}\ncatch (FileNotFoundException e)\n{\n    Console.WriteLine(\"specific: \" + e.Message);\n}\n```\nWhat happens when you try to compile this?",[192,194,196,198],{"key":175,"text":193},"Compiles fine; FileNotFoundException block is simply unreachable at runtime but no error at all, since the compiler simply reorders unreachable branches out of the generated IL",{"key":178,"text":195},"Compiles fine and FileNotFoundException catches first since compiler reorders catch blocks by specificity automatically even though catch blocks are normally matched strictly in the order they are written in source",{"key":181,"text":197},"Runtime error only when a FileNotFoundException is actually thrown; the compiler cannot detect this ordering issue and this ordering mistake would silently ship to production undetected until it actually happened",{"key":184,"text":199},"Compile-time error: a general catch clause (Exception) appears before a more specific one (FileNotFoundException), which C# disallows because the specific catch would never be reached","C# requires catch clauses to be ordered from most specific to least specific. Since FileNotFoundException derives from Exception, placing catch (Exception) first makes the later catch (FileNotFoundException) unreachable, and the compiler rejects this with a compile-time error rather than silently allowing dead code.",{"id":202,"topic":9,"difficulty":189,"body":203,"options":204,"correct_key":175,"explanation":213},"019f70e2-e7fb-7705-ab7b-b637027f35a1","Which statement about the .NET exception class hierarchy is correct?",[205,207,209,211],{"key":175,"text":206},"Exception is the root of the hierarchy; SystemException and ApplicationException are both subclasses of Exception, and the modern convention for custom exceptions is to derive directly from Exception rather than ApplicationException",{"key":178,"text":208},"All exceptions must derive from SystemException; deriving directly from Exception is not allowed and any attempt to derive a class straight from Exception is rejected by the compiler with an error",{"key":181,"text":210},"ApplicationException is the root class that all custom, user-defined exceptions must inherit from in the same way java.lang.Throwable anchors exceptions in some other object-oriented languages",{"key":184,"text":212},"Only exceptions thrown by the CLR itself can derive from Exception; user-defined exceptions must implement the IException interface instead a design mirroring how some other frameworks require exceptions to implement a marker interface","Exception is the base class of the entire hierarchy. SystemException is used (mostly) for exceptions defined by the runtime\u002FBCL; ApplicationException was originally intended for user-defined exceptions but its use is now discouraged in favor of deriving custom exception types directly from Exception.",{"id":215,"topic":9,"difficulty":171,"body":216,"options":217,"correct_key":181,"explanation":226},"019f70e2-e7fc-7a14-859c-366cee12be4a","In a try\u002Fcatch\u002Ffinally block, when does the finally block run?",[218,220,222,224],{"key":175,"text":219},"Only if an exception is thrown and caught by a matching catch block and finally is entirely skipped for exceptions that propagate unhandled past the enclosing method",{"key":178,"text":221},"Only if no exception is thrown at all which would make finally functionally redundant with just writing code after the try\u002Fcatch block",{"key":181,"text":223},"Always, whether or not an exception was thrown, and whether or not it was caught",{"key":184,"text":225},"Only if there is no catch block present for that try which is a common misconception since finally is actually independent of whether catch exists at all","The whole point of finally is that it runs unconditionally on the way out of the try\u002Fcatch, regardless of whether an exception occurred, was caught, or the block exited normally via return.",{"id":228,"topic":9,"difficulty":189,"body":229,"options":230,"correct_key":178,"explanation":239},"019f70e2-e7ff-75b1-9ee6-d404d5aa0454","```csharp\ntry\n{\n    DoWork();\n}\ncatch (Exception ex)\n{\n    Console.WriteLine(\"general: \" + ex.Message);\n}\ncatch (InvalidOperationException ex)\n{\n    Console.WriteLine(\"specific: \" + ex.Message);\n}\n```\nWhat happens when this code is compiled?",[231,233,235,237],{"key":175,"text":232},"It compiles fine, and the InvalidOperationException catch block runs whenever that specific exception type is thrown",{"key":178,"text":234},"Compile error (CS0160): the InvalidOperationException catch block is unreachable because the Exception catch above it already handles every exception type, including InvalidOperationException",{"key":181,"text":236},"It compiles, but the InvalidOperationException catch is dead code that the compiler silently ignores at runtime with no error or warning",{"key":184,"text":238},"It throws a runtime exception, \"unreachable catch clause\", the first time InvalidOperationException is thrown","C# requires catch blocks to be ordered from most specific to least specific. Since InvalidOperationException derives from Exception, a catch(Exception) block placed before catch(InvalidOperationException) would make the second block unreachable — the compiler rejects this with error CS0160, not a runtime error.",{"id":241,"topic":9,"difficulty":242,"body":243,"options":244,"correct_key":175,"explanation":253},"019f70e2-e801-7ab7-ba1c-1ad09fe6f4cc",3,"```csharp\nvoid Process()\n{\n    using var r = new Resource();\n    Console.WriteLine(\"working\");\n    if (DateTime.Now.Ticks % 2 == 0)\n        return;\n    Console.WriteLine(\"more work\");\n}\n```\nUsing a C# 8 \"using declaration\" (no braces) instead of a using block, when is r.Dispose() called?",[245,247,249,251],{"key":175,"text":246},"At the end of the enclosing block (here, the method), regardless of whether it exits via the final closing brace or an early return",{"key":178,"text":248},"Immediately after the line it's declared on, before \"working\" is printed since C# evaluates using declarations eagerly at the point of their own statement rather than at scope exit",{"key":181,"text":250},"Only when the method reaches its final closing brace normally; an early return skips disposal which would make using declarations behave differently from stacked using blocks wrapping the same code",{"key":184,"text":252},"Never automatically — using declarations require an explicit using block with braces to trigger disposal which would make the using keyword pointless to write without braces in the first place","A using declaration ties disposal to the end of the enclosing scope (the method body in this case), not to a specific line. It fires whether the method exits through its final brace or through an early return, exactly like a using block would if it wrapped the whole rest of the method.",{"fields":255,"seniorities":424,"interview_shapes":425,"locales":430,"oauth":432,"question_count":435,"coach_enabled":436,"jd_match_enabled":436},[256,267,287,303,327,340,359,378,398,405,411,418],{"key":5,"name_tr":6,"name_en":6,"sort":171,"specializations":257},[258,261,262,263,264,265,266],{"key":259,"name":260,"field":5},"general","Genel",{"key":154,"name":155,"field":5},{"key":166,"name":167,"field":5},{"key":157,"name":158,"field":5},{"key":150,"name":151,"field":5},{"key":160,"name":161,"field":5},{"key":163,"name":164,"field":5},{"key":268,"name_tr":269,"name_en":269,"sort":189,"specializations":270},"frontend","Frontend",[271,272,275,278,281,284],{"key":259,"name":260,"field":268},{"key":273,"name":274,"field":268},"javascript","JavaScript",{"key":276,"name":277,"field":268},"typescript","TypeScript",{"key":279,"name":280,"field":268},"react","React",{"key":282,"name":283,"field":268},"vue","Vue",{"key":285,"name":286,"field":268},"angular","Angular",{"key":288,"name_tr":289,"name_en":289,"sort":242,"specializations":290},"fullstack","Fullstack",[291,292,293,294,295,296,297,298,299,300,301,302],{"key":259,"name":260,"field":288},{"key":154,"name":155,"field":5},{"key":166,"name":167,"field":5},{"key":157,"name":158,"field":5},{"key":150,"name":151,"field":5},{"key":160,"name":161,"field":5},{"key":163,"name":164,"field":5},{"key":273,"name":274,"field":268},{"key":276,"name":277,"field":268},{"key":279,"name":280,"field":268},{"key":282,"name":283,"field":268},{"key":285,"name":286,"field":268},{"key":304,"name_tr":305,"name_en":305,"sort":306,"specializations":307},"devops-cloud","DevOps \u002F Cloud",4,[308,309,312,315,318,321,324],{"key":259,"name":260,"field":304},{"key":310,"name":311,"field":304},"aws","AWS",{"key":313,"name":314,"field":304},"gcp","GCP",{"key":316,"name":317,"field":304},"azure","Azure",{"key":319,"name":320,"field":304},"kubernetes","Kubernetes",{"key":322,"name":323,"field":304},"terraform","Terraform",{"key":325,"name":326,"field":304},"linux","Linux",{"key":328,"name_tr":329,"name_en":329,"sort":330,"specializations":331},"ai-engineer","AI Engineer",5,[332,333,334,337],{"key":259,"name":260,"field":328},{"key":166,"name":167,"field":328},{"key":335,"name":336,"field":328},"llm-rag","LLM\u002FRAG",{"key":338,"name":339,"field":328},"mlops","MLOps",{"key":341,"name_tr":342,"name_en":343,"sort":344,"specializations":345},"database","Veritabanı","Database",6,[346,347,350,353,356],{"key":259,"name":260,"field":341},{"key":348,"name":349,"field":341},"postgresql","PostgreSQL",{"key":351,"name":352,"field":341},"mysql","MySQL",{"key":354,"name":355,"field":341},"mongodb","MongoDB",{"key":357,"name":358,"field":341},"redis","Redis",{"key":360,"name_tr":361,"name_en":362,"sort":363,"specializations":364},"mobile","Mobil","Mobile",7,[365,366,369,372,375],{"key":259,"name":260,"field":360},{"key":367,"name":368,"field":360},"ios-swift","iOS (Swift)",{"key":370,"name":371,"field":360},"android-kotlin","Android (Kotlin)",{"key":373,"name":374,"field":360},"flutter","Flutter",{"key":376,"name":377,"field":360},"react-native","React Native",{"key":143,"name_tr":379,"name_en":144,"sort":380,"specializations":381},"Güvenlik",8,[382,383,386,389,392,395],{"key":259,"name":260,"field":143},{"key":384,"name":385,"field":143},"appsec","AppSec",{"key":387,"name":388,"field":143},"offensive-pentest","Offensive \u002F Pentest",{"key":390,"name":391,"field":143},"cloud-security","Cloud Security",{"key":393,"name":394,"field":143},"devsecops","DevSecOps",{"key":396,"name":397,"field":143},"blue-team-incident","Blue Team \u002F Incident",{"key":399,"name_tr":400,"name_en":401,"sort":402,"specializations":403},"qa-test-automation","QA \u002F Test Otomasyonu","QA \u002F Test Automation",9,[404],{"key":259,"name":260,"field":399},{"key":406,"name_tr":407,"name_en":407,"sort":408,"specializations":409},"data-engineer","Data Engineer",10,[410],{"key":259,"name":260,"field":406},{"key":412,"name_tr":413,"name_en":414,"sort":415,"specializations":416},"game-dev","Oyun Geliştirme","Game Development",11,[417],{"key":259,"name":260,"field":412},{"key":419,"name_tr":420,"name_en":420,"sort":421,"specializations":422},"ml-engineer","ML Engineer",12,[423],{"key":259,"name":260,"field":419},[14,15,16],{"junior":426,"mid":428,"senior":429},{"questions":427,"median_sec":3},20,{"questions":427,"median_sec":3},{"questions":427,"median_sec":3},[431,10],"tr",[433,434],"google","github",21750,true]