liveBook · Manning

Value type

A value type is a programming-language type whose values are treated as independent values when assigned or passed, rather than as references to a shared object.

How 2 Manning books explain it

.NET in Action, Second Edition

A value type is a .NET type whose values contain their data directly.

How it is used
Explains how .NET classifies types and why value/reference behavior matters when values cross method and API boundaries.
How deep it goes
Defines direct data storage, contrasts references, and introduces boxing without detailing copying or parameter-passing semantics.
Examples
Uses an int passed to Console.WriteLine and an integer Book.Id property to illustrate boxing and nullability.
What you can do after
Evaluate whether a .NET type is a value type and recognize when C# boxes it for an object parameter.

Read how .NET in Action, Second Edition explains value type →

F# in Action: A Revised Edition of Get Programming with F#

A value type is a type whose variables directly contain their data and whose values are copied when assigned or passed by value.

How it is used
Uses value types to model tuples or records with pass-by-value semantics when performance requirements warrant them.
How deep it goes
Explains storage, passing, copying, and garbage-collection tradeoffs, but defers detailed performance measurement to testing.
Examples
Uses struct tuple syntax and [<Struct>] record syntax as concrete examples.
What you can do after
Apply F# struct syntax to create value tuples or value-type records, then benchmark the resulting representation.

Read how F# in Action: A Revised Edition of Get Programming with F# explains value type →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.