Book description
Learn advanced C# concepts and techniques such as building caches, cryptography, and parallel programming by solving interesting programming challenges
Key Features
- Gain useful insights on advanced C# programming topics and APIs
- Use locking and cached values to solve parallel problems
- Take advantage of .NET's cryptographic tools to encrypt and decrypt strings
Book Description
C# is a multi-paradigm programming language. The Modern C# Challenge covers with aspects of the .NET Framework such as the Task Parallel Library (TPL) and CryptoAPI. It also encourages you to explore important programming trade-offs such as time versus space or simplicity. There may be many ways to solve a problem and there is often no single right way, but some solutions are definitely better than others. This book has combined these solutions to help you solve real-world problems with C#.
In addition to describing programming trade-offs, The Modern C# Challenge will help you build a useful toolkit of techniques such as value caching, statistical analysis, and geometric algorithms.
By the end of this book, you will have walked through challenges in C# and explored the .NET Framework in order to develop program logic for real-world applications.
What you will learn
- Perform statistical calculations such as finding the standard deviation
- Find combinations and permutations
- Search directories for files matching patterns using LINQ and PLINQ
- Find areas of polygons using geometric operations
- Randomize arrays and lists with extension methods
- Explore the filesystem to find duplicate files
- Simulate complex systems and implement equality in a class
- Use cryptographic techniques to encrypt and decrypt strings and files
Who this book is for
The Modern C# Challenge is for all C# developers of different abilities wanting to solve real-world problems. There are problems for everyone at any level of expertise in C#
Table of contents
- Title Page
- Copyright and Credits
- Dedication
- Packt Upsell
- Contributors
- Preface
-
Mathematics
-
Problems
- 1. Statistical functions
- 2. Permutations
- 3. Combinations
- 4. Factorials
- 5. Fibonacci numbers
- 6. Binomial coefficients
- 7. Pascal's triangle
- 8. Greatest common divisors
- 9. Least common multiples
- 10. Sums of multiples
- 11. Primality testing
- 12. Prime table
- 13. Prime factors
- 14. Unique prime factors
- 15. Prime tuples
- 16. Proper divisors
- 17. Amicable numbers
- 18. Perfect numbers
- 19. Armstrong numbers
-
Solutions
- 1. Statistical functions
- 2. Permutations
- 3. Combinations
- 4. Factorials
- 5. Fibonacci numbers
- 6. Binomial coefficients
- 7. Pascal's triangle
- 8. Greatest common divisors
- 9. Least common multiples
- 10. Sums of multiples
- 11. Primality testing
- 12. Prime table
- 13. Prime factors
- 14. Unique prime factors
- 15. Prime tuples
- 16. Proper divisors
- 17. Amicable numbers
- 18. Perfect numbers
- 19. Armstrong numbers
-
Problems
-
Geometry
-
Problems
- 20. Monte Carlo π
- 21. Newton's π
- 22. Bisection root-finding
- 23. Newton's method
- 24. Gaussian elimination
- 25. Monte Carlo integration
- 26. Rectangle rule integration
- 27. Trapezoid rule integration
- 28. Arrowheads
- 29. Line-line intersection
- 30. Point-line distance
- 31. Point-segment distance
- 32. Segment-segment distance
- 33. Circle selection
- 34. Line-circle intersection
- 35. Circle-circle intersection
- 36. Circle-line tangents
- 37. Polygon area
- 38. Point in a polygon
- 39. Convexity testing
- 40. Stars
-
Solutions
- 20. Monte Carlo π
- 21. Newton's π
- 22. Bisection root-finding
- 23. Newton's method
- 24. Gaussian elimination
- 25. Monte Carlo integration
- 26. Rectangle rule integration
- 27. Trapezoid rule integration
- 28. Arrowheads
- 29. Line-line intersection
- 30. Point-line distance
- 31. Point-segment distance
- 32. Segment-segment distance
- 33. Circle selection
- 34. Line-circle intersection
- 35. Circle-circle intersection
- 36. Circle-line tangents
- 37. Polygon area
- 38. Point in a polygon
- 39. Convexity testing
- 40. Stars
-
Problems
- Dates and Times
- Randomization
- Strings
- Files and Directories
- Advanced C# and .NET Features
- Simulations
- Cryptography
- Other Books You May Enjoy
Product information
- Title: The Modern C# Challenge
- Author(s):
- Release date: October 2018
- Publisher(s): Packt Publishing
- ISBN: 9781789535426
You might also like
book
Functional Programming with C#
After decades of relative obscurity, functional programming is finally coming into its own. With concise, easy-to-read …
book
Functional Programming in C#
Functional Programming in C# teaches you to apply functional thinking to real-world problems using the C# …
book
Design Patterns in C#: A Hands-on Guide with Real-world Examples
Get hands-on experience with each Gang of Four (GoF) design pattern using C#. For each of …
book
An Atypical ASP.NET Core 5 Design Patterns Guide
A .NET developer's guide to crafting robust, maintainable, and flexible web apps by leveraging C# 9 …