0% found this document useful (0 votes)
3 views2 pages

Full_CSharp_NET_Viva_Long_Answers

.NET Framework is a Microsoft software development platform consisting of key components like CLR for memory management, a rich class library, and a JIT compiler for code execution. A class in C# serves as a blueprint for creating objects, which are instances of classes. C# collections group related objects into non-generic and generic types, with generic collections being type-safe and offering better performance.

Uploaded by

sathekrn1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Full_CSharp_NET_Viva_Long_Answers

.NET Framework is a Microsoft software development platform consisting of key components like CLR for memory management, a rich class library, and a JIT compiler for code execution. A class in C# serves as a blueprint for creating objects, which are instances of classes. C# collections group related objects into non-generic and generic types, with generic collections being type-safe and offering better performance.

Uploaded by

sathekrn1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

C# and .

NET Viva Questions - Long Answers

Explain the Architecture of Dot net framework

The .NET Framework is a software development platform by Microsoft that provides tools and libraries to

build various types of applications. Its key components are:

1. Common Language Runtime (CLR): It handles memory management, security, exception handling, and

more.

2. .NET Class Library: A rich set of classes, interfaces, and value types that support many programming

tasks.

3. Common Type System (CTS): Ensures type safety across different .NET languages.

4. Common Language Specification (CLS): Standardizes features needed by most languages.

5. Just-In-Time (JIT) Compiler: Converts MSIL code to native machine code during execution.

6. Application Domains: Isolate applications for better security and stability.

7. Base Class Library (BCL): Includes basic types and collections.

This layered architecture ensures flexibility, security, and reusability in software development.

What is Class and Object?

A class in C# is a template or blueprint from which objects are created. It defines properties and behaviors.

Example:

class Car {

public string color;

public void Drive() {

Console.WriteLine("Driving a " + color + " car.");


C# and .NET Viva Questions - Long Answers

An object is an instance of a class:

Car myCar = new Car();

myCar.color = "Red";

myCar.Drive();

Here, 'myCar' is an object of class 'Car'.

What is collection in c#?

A collection in C# is a group of related objects. C# supports two types of collections:

1. Non-Generic Collections: Found in System.Collections (e.g., ArrayList, Hashtable).

2. Generic Collections: Found in System.Collections.Generic (e.g., List<T>, Dictionary<TKey, TValue>).

Generic collections are type-safe and offer better performance.

Example:

List<int> numbers = new List<int>() {1, 2, 3};

foreach (int num in numbers)

Console.WriteLine(num);

You might also like