Top "Value-type" questions

In computer science, the term value type is commonly used to refer to one of two kinds of data types: Types of values or Types of objects with deep copy semantics.

Do interface variables have value-type or reference-type semantics?

Do interface variables have value-type or reference-type semantics? Interfaces are implemented by types, and those types are either value types …

c# .net interface value-type reference-type
Using Structs with WCF Services

Is there any official recommendation on using structs as return types with WCF services? I'm currently interacting with a service …

c# wcf struct value-type
Why is there no RAII in .NET?

Being primarily a C++ developer the absence of RAII (Resource Acquisition Is Initialization) in Java and .NET has always bothered …

.net struct destructor raii value-type
Entities across bounded contexts in Domain-Driven Design

I am trying to understand how entities operate in multiple bounded contexts. Given an Employee of a Company. In (for …

domain-driven-design entity value-type bounded-contexts
How to create an instance of value types using reflection

I want to create an instance of value types like System.String, System.Boolean, System.Int32, etc. I get qualified …

c# .net reflection value-type
Details on what happens when a struct implements an interface

I recently came across this Stackoverflow question: When to use struct? In it, it had an answer that said something …

c# .net struct value-type boxing
Does Java make distinction between value type and reference type

C# makes distinction of those two. Does java do the same or differently?

c# java value-type reference-type
Why is a fixed size buffers (arrays) must be unsafe?

Let's say I want to have a value type of 7 bytes (or 3 or 777). I can define it like that: public …

c# arrays unsafe fixed value-type
Use cases for boxing a value type in C#?

There are cases when an instance of a value type needs to be treated as an instance of a reference …

c# boxing value-type reference-type cts
Does swift copy on write for all structs?

I know that swift will optimize to copy on write for arrays but will it do this for all structs? …

swift value-type copy-on-write