InterviewTreedInterviewTreed

The question library

Technical interview questions and answers

Explore practical questions, clear explanations, and code examples across developer technologies.

Showing 1021–1032 of 3610 questions

C# & .NET DevelopmentBeginner1 min read

What are properties in C#?

Properties expose controlled access to state using get and set accessors. Auto-properties let the compiler generate backing storage.

C# & .NET DevelopmentBeginner1 min read

What are access modifiers?

Access modifiers control where types and members can be accessed. Common modifiers are public, private, protected, internal, protected internal, private pr

C# & .NET DevelopmentBeginner1 min read

What is a constructor?

A constructor initializes a new instance. It has the class name and no return type. C# also supports static constructors and primary constructors in suppor

C# & .NET DevelopmentBeginner1 min read

What is method overloading?

Overloading defines multiple methods with the same name but different parameter signatures. Return type alone cannot distinguish overloads.

C# & .NET DevelopmentBeginner1 min read

What is an enum?

An enum defines a set of named constants backed by an integral type. It makes code more readable than unexplained numeric values.

C# & .NET DevelopmentBeginner1 min read

What is a struct?

A struct is a value type, suitable for small values with value semantics. Structs can have methods and properties. Prefer immutable structs for predictable

C# & .NET DevelopmentBeginner1 min read

What is a record in C#?

Records are designed for data-centric types and provide value-based equality. Record classes are reference types; record structs are value types.

C# & .NET DevelopmentBeginner1 min read

Why are strings immutable?

A string cannot be changed after creation. Operations that appear to modify a string produce another string. Immutability simplifies sharing and hashing.

C# & .NET DevelopmentBeginner1 min read

What is an array?

An array stores a fixed-size sequence of elements of the same type and uses zero-based indexing.