Chapter 6

Answers to Chapter 6 Review Questions

1: Why are there two ways to categorize the types in C#?
A1: The distinction “Simple types versus derived types” is used for historical reasons and because it is convenient, but it is strictly speaking not correct. In contrast “Value types versus reference types” is correct but perhaps less intuitive.
2: Why does C# have other simple types than int?
A2: Different types are needed to represent different kinds of data.
3: Which kind of attributes distinguish the different types from each other?
A3: The kind of data the type can represent, the memory use, the kind of operations in which it will take part, and in case it can hold simple numbers: the range and precision.
4: What does it mean to be a strongly ...

Get C# Primer Plus now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.