{"id":971,"date":"2023-03-13T15:19:26","date_gmt":"2023-03-13T15:19:26","guid":{"rendered":"https:\/\/www.naveedulhaq.com\/?page_id=971"},"modified":"2023-07-10T22:33:52","modified_gmt":"2023-07-10T22:33:52","slug":"c-interview-questions","status":"publish","type":"page","link":"https:\/\/www.naveedulhaq.com\/index.php\/interview-questions-and-answers\/c-interview-questions\/","title":{"rendered":"C# Interview Questions"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2023\/03\/c-interview-questions-1024x576.webp\" loading=\"lazy\" alt=\"c# interview questions\" class=\"wp-image-983\" width=\"512\" height=\"288\" srcset=\"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2023\/03\/c-interview-questions-1024x576.webp 1024w, https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2023\/03\/c-interview-questions-300x169.webp 300w, https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2023\/03\/c-interview-questions-768x432.webp 768w, https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2023\/03\/c-interview-questions.webp 1200w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><figcaption class=\"wp-element-caption\">c# interview questions<\/figcaption><\/figure>\n<\/div>\n\n\n<p>I have collected C# interview questions and answers for fresh developers, senior developers, and mid-level developers.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">C# Interview questions for Beginners<\/h2>\n\n\n\n<p><strong>Question<\/strong>: What is polymorphism in c#<\/p>\n\n\n\n<p><strong>Answer:<\/strong> <a href=\"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/what-is-polymorphism-in-c\/\">Polymorphism in c#<\/a><\/p>\n\n\n\n<p><strong>Question<\/strong>: what is boxing &amp; unboxing in c#?<\/p>\n\n\n\n<p><strong>Answer: <\/strong><a href=\"https:\/\/www.naveedulhaq.com\/index.php\/dot-net-core\/what-is-boxing-unboxing-in-c-sharp\/\">Boxing &amp; Unboxing in C#<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Senior developers<\/h2>\n\n\n\n<p><strong>Question<\/strong>: what is the SOLID principle in C#<\/p>\n\n\n\n<p><strong>Answer<\/strong>: SOLID is a set of principles that guide software development and design, aimed at producing code that is more modular, flexible, and maintainable. The acronym SOLID stands for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>S<\/strong> &#8211; Single Responsibility Principle (SRP)<\/li>\n\n\n\n<li><strong>O<\/strong> &#8211; Open\/Closed Principle (OCP)<\/li>\n\n\n\n<li><strong>L<\/strong> &#8211; Liskov Substitution Principle (LSP)<\/li>\n\n\n\n<li><strong>I<\/strong> &#8211; Interface Segregation Principle (ISP)<\/li>\n\n\n\n<li><strong>D<\/strong> &#8211; Dependency Inversion Principle (DIP)<\/li>\n<\/ul>\n\n\n\n<p>Here&#8217;s a brief overview of each principle:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Single Responsibility Principle (SRP): A class should have only one reason to change. In other words, a class should have only one responsibility or job to do. This principle promotes the idea of creating smaller, more focused classes that are easier to test, maintain, and extend.<\/li>\n\n\n\n<li>Open\/Closed Principle (OCP): A class should be open for extension but closed for modification. This principle encourages developers to design their classes in a way that allows them to add new functionality without modifying the existing code. This can be achieved by using inheritance, composition, or other design patterns.<\/li>\n\n\n\n<li>Liskov Substitution Principle (LSP): Subtypes should be substitutable for their base types. This principle ensures that a subclass can be used in place of its parent class without any unexpected behavior. In other words, a subclass should adhere to the same contract as its parent class.<\/li>\n\n\n\n<li>Interface Segregation Principle (ISP): A client should not be forced to depend on interfaces it does not use. This principle encourages developers to create smaller, more specific interfaces that are tailored to the needs of the client. This helps to avoid unnecessary dependencies and makes the code more modular.<\/li>\n\n\n\n<li>Dependency Inversion Principle (DIP): High-level modules should not depend on low-level modules. Both should depend on abstractions. This principle promotes the use of interfaces and abstractions to reduce coupling between components. It encourages the use of dependency injection, which allows components to be easily replaced or modified without affecting the rest of the system.<\/li>\n<\/ol>\n\n\n\n<p>By following the SOLID principles, developers can create code that is easier to understand, test, and maintain. The SOLID principles promote modularity, flexibility, and extensibility, which are important qualities for any software system.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have collected C# interview questions and answers for fresh developers, senior developers, and mid-level developers. C# Interview questions for Beginners Question: What is polymorphism&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":943,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-templates\/page-fullwidth.php","meta":{"footnotes":""},"class_list":["post-971","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>C# Interview Questions - Naveed Ul-Haq&#039;s blog<\/title>\n<meta name=\"description\" content=\"C# Interview Questions and answers with examples for beginners, mid-level developers, and senior developers - Naveed Ul-Haq&#039;s blog\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.naveedulhaq.com\/index.php\/interview-questions-and-answers\/c-interview-questions\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"C# Interview Questions - Naveed Ul-Haq&#039;s blog\" \/>\n<meta property=\"og:description\" content=\"C# Interview Questions and answers with examples for beginners, mid-level developers, and senior developers - Naveed Ul-Haq&#039;s blog\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.naveedulhaq.com\/index.php\/interview-questions-and-answers\/c-interview-questions\/\" \/>\n<meta property=\"og:site_name\" content=\"Naveed Ul-Haq&#039;s blog\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-10T22:33:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2023\/03\/c-interview-questions-1024x576.webp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/interview-questions-and-answers\\\/c-interview-questions\\\/\",\"url\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/interview-questions-and-answers\\\/c-interview-questions\\\/\",\"name\":\"C# Interview Questions - Naveed Ul-Haq&#039;s blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/interview-questions-and-answers\\\/c-interview-questions\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/interview-questions-and-answers\\\/c-interview-questions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.naveedulhaq.com\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/c-interview-questions-1024x576.webp\",\"datePublished\":\"2023-03-13T15:19:26+00:00\",\"dateModified\":\"2023-07-10T22:33:52+00:00\",\"description\":\"C# Interview Questions and answers with examples for beginners, mid-level developers, and senior developers - Naveed Ul-Haq&#039;s blog\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/interview-questions-and-answers\\\/c-interview-questions\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/interview-questions-and-answers\\\/c-interview-questions\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/interview-questions-and-answers\\\/c-interview-questions\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.naveedulhaq.com\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/c-interview-questions-1024x576.webp\",\"contentUrl\":\"https:\\\/\\\/www.naveedulhaq.com\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/c-interview-questions-1024x576.webp\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/interview-questions-and-answers\\\/c-interview-questions\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.naveedulhaq.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Interview Questions and answers\",\"item\":\"https:\\\/\\\/www.naveedulhaq.com\\\/index.php\\\/interview-questions-and-answers\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"C# Interview Questions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#website\",\"url\":\"https:\\\/\\\/www.naveedulhaq.com\\\/\",\"name\":\"Naveed Ul-Haq's blog\",\"description\":\"AI, Optimizely, Azure &amp; more\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/dd6db5980b965fcae41e096d357c65c9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.naveedulhaq.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.naveedulhaq.com\\\/#\\\/schema\\\/person\\\/dd6db5980b965fcae41e096d357c65c9\",\"name\":\"Naveed Ul-Haq\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\",\"caption\":\"Naveed Ul-Haq\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g\"},\"description\":\"I lead engineering delivery teams for digital commerce and digital experience platforms, combining hands-on architecture experience with strong delivery governance. Over 20+ years, I\u2019ve built and led cross\u2011functional teams (engineering, BA, QA) delivering modern cloud solutions on Azure, microservices, APIs and eCommerce\\\/CMS platforms. My recent focus includes AI-enabled commerce automation: product ingestion and enrichment workflows, content optimisation for SEO and shopping feeds, and agentic tooling to improve marketing and accessibility workflows. I\u2019m passionate about building high-performing teams, establishing quality\\\/release standards, and delivering measurable outcomes across performance, reliability, and speed of change.\",\"sameAs\":[\"https:\\\/\\\/www.naveedulhaq.com\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/naveedulhaq\\\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"C# Interview Questions - Naveed Ul-Haq&#039;s blog","description":"C# Interview Questions and answers with examples for beginners, mid-level developers, and senior developers - Naveed Ul-Haq&#039;s blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.naveedulhaq.com\/index.php\/interview-questions-and-answers\/c-interview-questions\/","og_locale":"en_GB","og_type":"article","og_title":"C# Interview Questions - Naveed Ul-Haq&#039;s blog","og_description":"C# Interview Questions and answers with examples for beginners, mid-level developers, and senior developers - Naveed Ul-Haq&#039;s blog","og_url":"https:\/\/www.naveedulhaq.com\/index.php\/interview-questions-and-answers\/c-interview-questions\/","og_site_name":"Naveed Ul-Haq&#039;s blog","article_modified_time":"2023-07-10T22:33:52+00:00","og_image":[{"url":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2023\/03\/c-interview-questions-1024x576.webp","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.naveedulhaq.com\/index.php\/interview-questions-and-answers\/c-interview-questions\/","url":"https:\/\/www.naveedulhaq.com\/index.php\/interview-questions-and-answers\/c-interview-questions\/","name":"C# Interview Questions - Naveed Ul-Haq&#039;s blog","isPartOf":{"@id":"https:\/\/www.naveedulhaq.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/interview-questions-and-answers\/c-interview-questions\/#primaryimage"},"image":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/interview-questions-and-answers\/c-interview-questions\/#primaryimage"},"thumbnailUrl":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2023\/03\/c-interview-questions-1024x576.webp","datePublished":"2023-03-13T15:19:26+00:00","dateModified":"2023-07-10T22:33:52+00:00","description":"C# Interview Questions and answers with examples for beginners, mid-level developers, and senior developers - Naveed Ul-Haq&#039;s blog","breadcrumb":{"@id":"https:\/\/www.naveedulhaq.com\/index.php\/interview-questions-and-answers\/c-interview-questions\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.naveedulhaq.com\/index.php\/interview-questions-and-answers\/c-interview-questions\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.naveedulhaq.com\/index.php\/interview-questions-and-answers\/c-interview-questions\/#primaryimage","url":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2023\/03\/c-interview-questions-1024x576.webp","contentUrl":"https:\/\/www.naveedulhaq.com\/wp-content\/uploads\/2023\/03\/c-interview-questions-1024x576.webp"},{"@type":"BreadcrumbList","@id":"https:\/\/www.naveedulhaq.com\/index.php\/interview-questions-and-answers\/c-interview-questions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.naveedulhaq.com\/"},{"@type":"ListItem","position":2,"name":"Interview Questions and answers","item":"https:\/\/www.naveedulhaq.com\/index.php\/interview-questions-and-answers\/"},{"@type":"ListItem","position":3,"name":"C# Interview Questions"}]},{"@type":"WebSite","@id":"https:\/\/www.naveedulhaq.com\/#website","url":"https:\/\/www.naveedulhaq.com\/","name":"Naveed Ul-Haq's blog","description":"AI, Optimizely, Azure &amp; more","publisher":{"@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/dd6db5980b965fcae41e096d357c65c9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.naveedulhaq.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/www.naveedulhaq.com\/#\/schema\/person\/dd6db5980b965fcae41e096d357c65c9","name":"Naveed Ul-Haq","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g","caption":"Naveed Ul-Haq"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/362536aba6cc66917d7558cacd015a81c7cdf1a69b9a28c994764847c487b692?s=96&d=mm&r=g"},"description":"I lead engineering delivery teams for digital commerce and digital experience platforms, combining hands-on architecture experience with strong delivery governance. Over 20+ years, I\u2019ve built and led cross\u2011functional teams (engineering, BA, QA) delivering modern cloud solutions on Azure, microservices, APIs and eCommerce\/CMS platforms. My recent focus includes AI-enabled commerce automation: product ingestion and enrichment workflows, content optimisation for SEO and shopping feeds, and agentic tooling to improve marketing and accessibility workflows. I\u2019m passionate about building high-performing teams, establishing quality\/release standards, and delivering measurable outcomes across performance, reliability, and speed of change.","sameAs":["https:\/\/www.naveedulhaq.com","https:\/\/www.linkedin.com\/in\/naveedulhaq\/"]}]}},"_links":{"self":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/pages\/971","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/comments?post=971"}],"version-history":[{"count":0,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/pages\/971\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/pages\/943"}],"wp:attachment":[{"href":"https:\/\/www.naveedulhaq.com\/index.php\/wp-json\/wp\/v2\/media?parent=971"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}