{"id":184,"date":"2023-01-24T11:32:41","date_gmt":"2023-01-24T11:32:41","guid":{"rendered":"https:\/\/www.foundit.in\/zuno\/careerbuddy\/?p=184"},"modified":"2023-05-17T12:35:23","modified_gmt":"2023-05-17T12:35:23","slug":"net-interview-questions-and-answers-for-freshers","status":"publish","type":"post","link":"https:\/\/www.foundit.in\/zuno\/careerbuddy\/net-interview-questions-and-answers-for-freshers\/","title":{"rendered":".NET Interview Questions And Answers For Freshers"},"content":{"rendered":"<h2><strong>.NET Interview Questions And Answers<\/strong><\/h2>\n<h3><\/h3>\n<h3><b><span data-contrast=\"auto\">1. What is the .NET framework?<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p>&nbsp;<\/p>\n<p><span data-contrast=\"auto\">The .NET framework is a software framework developed by Microsoft that provides a common set of libraries and runtime for building and running applications on Windows. It includes a common language runtime (CLR) that manages the execution of code, and a set of class libraries that provide a variety of services and functionality for applications.<\/span><\/p>\n<p><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h3><b><span data-contrast=\"auto\">2. What are the main components of the .NET framework?<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p>&nbsp;<\/p>\n<p><span data-contrast=\"auto\">The main components of the .NET framework include the CLR, the .NET class library, and the common language runtime (CLR). The CLR is the runtime environment that manages the execution of .NET code, while the .NET class library provides a set of reusable classes and methods for building applications.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><b><span data-contrast=\"auto\">3. What is the difference between a managed and an unmanaged code in .NET?<\/span><\/b><\/h3>\n<p><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Managed code is code that is executed by the CLR and has access to the services and resources provided by the .NET framework. Unmanaged code is code that is executed outside of the CLR and does not have access to the resources and services provided by the .NET framework.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><b><span data-contrast=\"auto\">4. What is the role of the garbage collector in .NET?<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p>&nbsp;<\/p>\n<p><span data-contrast=\"auto\">The garbage collector is responsible for managing the allocation and release of memory for managed objects in .NET. It periodically checks for objects that are no longer being used and frees up the memory they occupy, so that it can be reused by other objects. This helps to prevent memory leaks and improve the performance of .NET applications.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><b><span data-contrast=\"auto\">5. What is an assembly in .NET?<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p>&nbsp;<\/p>\n<p><span data-contrast=\"auto\">An assembly is a collection of compiled code, resources, and metadata that can be deployed and executed as a single unit. Assemblies are the building blocks of .NET applications and can be deployed either privately or globally, depending on the needs of the application.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><b><span data-contrast=\"auto\">6. What is a namespace in .NET?<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p>&nbsp;<\/p>\n<p><span data-contrast=\"auto\">A namespace is a container for a set of related classes and other types in .NET. It helps to organize the types in a logical hierarchy and prevent naming conflicts between different types. Namespaces are often used to group related types together and provide a way to refer to them in code.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><b><span data-contrast=\"auto\">7. What is the purpose of the Common Language Specification (CLS)?<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p>&nbsp;<\/p>\n<p><span data-contrast=\"auto\">The Common Language Specification (CLS) is a set of rules and guidelines for designing and implementing .NET classes and types. It helps to ensure that .NET types are interoperable and can be used by any .NET language. By following the CLS, developers can create types that can be used by any .NET language, regardless of the language in which they were implemented.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<h2><strong>You May Also Like:<\/strong><\/h2>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/www.foundit.in\/zuno\/careerbuddy\/why-should-we-hire-you-nail-this-question-in-interviews\/\">Why should we Hire You ?<\/a><\/p>\n<p><a href=\"https:\/\/www.foundit.in\/zuno\/careerbuddy\/python-interview-questions-for-freshers\/\">Python Interview Questions and answers<\/a><\/p>\n<p><a href=\"https:\/\/www.foundit.in\/zuno\/careerbuddy\/how-to-answer-9-common-interview-questions-for-freshers\/\">Common Interview Questions and answers<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>.NET Interview Questions And Answers 1. What is the .NET framework?\u00a0 &nbsp; The .NET framework is a software framework developed by Microsoft that provides a common set of libraries and runtime for building and running applications on Windows. It includes a common language runtime (CLR) that manages the execution of code, and a set of [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":325,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":{"0":"post-184","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-interviews"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.foundit.in\/zuno\/careerbuddy\/wp-json\/wp\/v2\/posts\/184","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.foundit.in\/zuno\/careerbuddy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.foundit.in\/zuno\/careerbuddy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.foundit.in\/zuno\/careerbuddy\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.foundit.in\/zuno\/careerbuddy\/wp-json\/wp\/v2\/comments?post=184"}],"version-history":[{"count":5,"href":"https:\/\/www.foundit.in\/zuno\/careerbuddy\/wp-json\/wp\/v2\/posts\/184\/revisions"}],"predecessor-version":[{"id":431,"href":"https:\/\/www.foundit.in\/zuno\/careerbuddy\/wp-json\/wp\/v2\/posts\/184\/revisions\/431"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.foundit.in\/zuno\/careerbuddy\/wp-json\/wp\/v2\/media\/325"}],"wp:attachment":[{"href":"https:\/\/www.foundit.in\/zuno\/careerbuddy\/wp-json\/wp\/v2\/media?parent=184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.foundit.in\/zuno\/careerbuddy\/wp-json\/wp\/v2\/categories?post=184"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.foundit.in\/zuno\/careerbuddy\/wp-json\/wp\/v2\/tags?post=184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}