Summary

This chapter has demonstrated the features of the String class and the functionality provided by the .NET class libraries to support string manipulation. We have shown that the support in both Java and .NET is broadly the same with respect to simple string manipulation, dynamic string building, and string encoding.

The string formatting features of .NET, however, offer better integration with the rest of the class library than the equivalent functionality in Java, and the C# params support results in cleaner syntax. The use of the IFormattable interface and the encapsulation of rendering logic within the target class provide a flexible architecture.

The regular expression implementation provided in .NET is strong and offers a superset of ...

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.