All fields

“Value vs Reference Types” in Information Technology

15 questions across 1 technology.

Information Technology

15 questions in 1 technology

#QuestionTechnologyTopicLevel
1What is the difference between value types and reference types in C#, and how does this affect variable assignment? C# › Value vs Reference TypesC#Value vs Reference TypesBeginner
2Where are value types and reference types stored? C# › Value vs Reference TypesC#Value vs Reference TypesBeginner
3What is the difference between a value type and a reference type? C# › Value vs Reference TypesC#Value vs Reference TypesBeginner
4How do nullable value types (int?) work under the hood? C# › Value vs Reference TypesC#Value vs Reference TypesAdvanced
5What is boxing and unboxing in C#, and why can excessive boxing hurt performance? C# › Value vs Reference TypesC#Value vs Reference TypesIntermediate
6What is boxing and unboxing, and why does it matter? C# › Value vs Reference TypesC#Value vs Reference TypesIntermediate
7When should you define a struct instead of a class? C# › Value vs Reference TypesC#Value vs Reference TypesIntermediate
8Why can mutable structs cause subtle bugs? C# › Value vs Reference TypesC#Value vs Reference TypesAdvanced
9How are generics implemented for value types vs reference types in the CLR? C# › GenericsC#GenericsAdvanced
10What is the difference between reference equality (==) and value equality (Equals()) for a reference type by default? C# › Equality: Equals, GetHashCode & IEquatableC#Equality: Equals, GetHashCode & IEquatableBeginner
11What is the difference between 'var' and an explicitly typed variable declaration in C#? C# › FundamentalsC#FundamentalsBeginner
12What is the difference between the stack and the heap in .NET memory management? C# › Memory & Garbage CollectionC#Memory & Garbage CollectionBeginner
13How do 'ref', 'out', and 'in' parameter modifiers differ in how they pass arguments to a method? C# › FundamentalsC#FundamentalsIntermediate
14How do you define a custom implicit or explicit conversion operator between your type and another type? C# › Indexers & Operator OverloadingC#Indexers & Operator OverloadingIntermediate
15How does the C# compiler enforce 'definite assignment' analysis, and what compile error results from violating it? C# › FundamentalsC#FundamentalsAdvanced