Summary

This chapter has described the support for numbers, dates, and times provided by the .NET class library. Both Java and .NET provide comparable functionality despite implementation differences. The object capabilities provided by the .NET numeric types avoid the need for the separate wrapper and formatting used in Java, although .NET still consolidates conversions into a separate utility class.

.NET provides more unified time and date support. The implementation of the DateTime class avoids functionality being spread across multiple related classes, and the use of operators on DateTime instances makes for cleaner, more readable code.

Get C# for Java Developers 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.