Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
The Modern C# Challenge

You're reading from   The Modern C# Challenge Become an expert C# programmer by solving interesting programming problems

Arrow left icon
Product type Book
Published in Oct 2018
Publisher Packt
ISBN-13 9781789535426
Pages 362 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Rod Stephens Rod Stephens
Author Profile Icon Rod Stephens
Rod Stephens
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Title Page
Copyright and Credits
Dedication
Packt Upsell
Contributors
Preface
1. Mathematics FREE CHAPTER 2. Geometry 3. Dates and Times 4. Randomization 5. Strings 6. Files and Directories 7. Advanced C# and .NET Features 8. Simulations 9. Cryptography 1. Other Books You May Enjoy Index

Index

A

  • advanced C#, problems
    • about / Problems
    • LINQ style / 73. Directory size, LINQ style
    • directory size / 73. Directory size, LINQ style, 74. Directory size, PLINQ style
    • PLINQ style / 74. Directory size, PLINQ style
    • DirectoryInfo class / 75. Find files, LINQ style
    • parallel primes table / 76. Parallel primes table
    • parallel prime tuples / 77. Parallel prime tuples
    • parallel Monte Carlo π / 78. Parallel Monte Carlo π
    • primes, yielding / 79. Yielding primes
    • Fibonacci numbers, yielding / 80. Yielding Fibonacci numbers
    • complex numbers / 81. Complex numbers
  • advanced C#, solutions
    • about / Solutions
    • directory size / 73. Directory size, LINQ style, 74. Directory size, PLINQ style
    • LINQ style / 73. Directory size, LINQ style, 75. Find files, LINQ style
    • PLINQ style / 74. Directory size, PLINQ style
    • DirectoryInfo class / 75. Find files, LINQ style
    • parallel primes table / 76. Parallel primes table
    • parallel primes tuple / 77. Parallel primes tuple
    • parallel Monte Carlo π / 78. Parallel Monte Carlo π
    • primes, yielding / 79. Yielding primes
    • Fibonacci numbers, yielding / 80. Yielding Fibonacci numbers
    • complex numbers / 81. Complex numbers
  • age
    • calculating / 48. Calculating age, 48. Calculating age
  • amicable numbers / 17. Amicable numbers, 17. Amicable numbers
  • argument / 81. Complex numbers
  • Armstrong number / 19. Armstrong numbers, 19. Armstrong numbers
  • arrowheads / 28. Arrowheads, 28. Arrowheads
  • augmented matrix / 24. Gaussian elimination

B

  • backsolving / 24. Gaussian elimination
  • bases / 27. Trapezoid rule integration
  • Binomial coefficients
    • about / 6. Binomial coefficients
    • calculating / 6. Binomial coefficients
  • bisection root-finding / 22. Bisection root-finding
  • bytes
    • to hex / 57. Bytes to hex, 57. Bytes to hex

C

  • Caesar cipher / 91. Caesar cipher, 91. Caesar cipher
  • circle-circle intersection / 35. Circle-circle intersection, 35. Circle-circle intersection
  • circle-line tangents / 36. Circle-line tangents, 36. Circle-line tangents
  • circle selection / 33. Circle selection, 33. Circle selection
  • coder decoder (codec) / 72. Compressing images
  • Collatz conjecture / 83. Hailstone sequence
  • combinations / 3. Combinations, 3. Combinations
  • composite numbers / 11. Primality testing
  • convexity testing / 39. Convexity testing, 39. Convexity testing
  • convex polygon / 39. Convexity testing
  • cousin primes / 15. Prime tuples
  • cross product / 38. Point in a polygon
  • Cryptographically Secure Pseudorandom Number Generator (CSPRNG) / 93. Cryptographic pseudorandom numbers
  • Cryptographic Pseudorandom Number Generator (CPRNG) / 93. Cryptographic pseudorandom numbers, 93. Cryptographic random numbers
  • cryptography, problems
    • Caesar cipher / 91. Caesar cipher
    • Vigenère cipher / 92. Vigenère cipher
    • cryptographic pseudorandom numbers / 93. Cryptographic pseudorandom numbers
    • primality testing / 94. Primality testing, redux
    • primes, searching / 95. Find primes
    • hash files / 96. Hash files
    • steganography / 97. Steganography
    • strings, encrypting / 98. Encrypt and decrypt strings
    • strings, decrypting / 98. Encrypt and decrypt strings
    • files, encrypting / 99. Encrypt and decrypt files
    • files, decrypting / 99. Encrypt and decrypt files
    • CryptoPad / 100. CryptoPad
  • cryptography, solutions
    • about / Solutions
    • Caesar cipher / 91. Caesar cipher
    • Vigenère cipher / 92. Vigenère cipher
    • cryptographic random numbers / 93. Cryptographic random numbers
    • primality testing / 94. Primality testing, redux
    • primes, searching / 95. Find primes
    • hash files / 96. Hash files
    • steganography / 97. Steganography
    • strings, encrypting / 98. Encrypt and decrypt strings
    • strings, decrypting / 98. Encrypt and decrypt strings
    • files, decrypting / 99. Encrypt and decrypt files
    • files, encrypting / 99. Encrypt and decrypt files
    • CryptoPad / 100. CryptoPad
  • CryptoPad / 100. CryptoPad, 100. CryptoPad

D

  • DateTimePicker control / 42. Date and time picker, 42. Date and time picker
  • Dawkins' weasel / 82. Dawkins' weasel
  • discriminant / 34. Line-circle intersection
  • divisor / 16. Proper divisors
  • dot product / 38. Point in a polygon
  • duration
    • calculating / 47. Calculating duration, 47. Calculating duration

E

  • edit distance / 61. Edit distance, 61. Edit distance
  • Euclid's algorithm / 8. Greatest common divisors

F

  • factorials
    • about / 4. Factorials
    • calculating / 4. Factorials
  • Fibonacci numbers
    • calculating / 5. Fibonacci numbers, 5. Fibonacci numbers
  • files
    • encrypting / 99. Encrypt and decrypt files, 99. Encrypt and decrypt files
    • decrypting / 99. Encrypt and decrypt files, 99. Encrypt and decrypt files
  • files, problems
    • about / Problems
    • blank lines, removing / 64. Removing blank lines
    • directory size / 65. Directory size
    • duplicate files, finding / 66. Finding duplicate files
    • thumbnails / 67. Thumbnails
    • thumbnails web page / 68. Thumbnail web page
    • directory, searching / 69. Find files
    • Find and Replace / 70. Find and Replace
    • images, saving / 71. Saving images
    • images, compressing / 72. Compressing images
  • files, solution
    • about / Solutions
    • blank lines, removing / 64. Removing blank lines
    • directory size / 65. Directory size
    • duplicate files, finding / 66. Finding duplicate files
    • thumbnails / 67. Thumbnails
    • thumbnails web page / 68. Thumbnail web page
    • directory, searching / 69. Find files
    • Find and Replace / 70. Find and Replace
    • images, saving / 71. Saving images
    • images, compressing / 72. Compressing images

G

  • Game of Life / 86. Life, 86. Life
  • Gaussian elimination / 24. Gaussian elimination, 24. Gaussian elimination
  • geometry, problems
    • about / Problems
    • Monte Carlo π / 20. Monte Carlo π
    • Newton's π / 21. Newton's π
    • bisection root-finding / 22. Bisection root-finding
    • Newton's method / 23. Newton's method
    • Gaussian elimination / 24. Gaussian elimination
    • Monte Carlo integration / 25. Monte Carlo integration
    • rectangle rule integration / 26. Rectangle rule integration
    • trapezoid rule integration / 27. Trapezoid rule integration
    • arrowheads / 28. Arrowheads
    • line-line intersection / 29. Line-line intersection
    • point-line distance / 30. Point-line distance
    • point-segment distance / 31. Point-segment distance
    • segment-segment distance / 32. Segment-segment distance
    • circle selection / 33. Circle selection
    • line-circle intersection / 34. Line-circle intersection
    • circle-circle intersection / 35. Circle-circle intersection
    • circle-line tangents / 36. Circle-line tangents
    • polygon area / 37. Polygon area
    • point in polygon / 38. Point in a polygon
    • convexity testing / 39. Convexity testing
    • stars / 40. Stars
  • geometry, solutions
    • about / Solutions
    • Monte Carlo π / 20. Monte Carlo π
    • Newton's π / 21. Newton's π
    • bisection root-finding / 22. Bisection root-finding
    • Newton's method / 23. Newton's method
    • Gaussian elimination / 24. Gaussian elimination
    • Monte Carlo integration / 25. Monte Carlo integration
    • rectangle rule integration / 26. Rectangle rule integration
    • trapezoid rule integration / 27. Trapezoid rule integration
    • arrowheads / 28. Arrowheads
    • line-line intersection / 29. Line-line intersection
    • point-line distance / 30. Point-line distance
    • point-segment distance / 31. Point-segment distance
    • segment-segment distance / 32. Segment-segment distance
    • circle selection / 33. Circle selection
    • line-circle intersection / 34. Line-circle intersection
    • circle-circle intersection / 35. Circle-circle intersection
    • circle-line tangents / 36. Circle-line tangents
    • polygon area / 37. Polygon area
    • point in polygon / 38. Point in a polygon
    • convexity testing / 39. Convexity testing
    • Stars / 40. Stars
  • greatest common divisors (GCD) / 8. Greatest common divisors, 8. Greatest common divisors

H

  • Hailstone sequence / 83. Hailstone sequence, 83. Hailstone sequence
  • hashing / 96. Hash files, 96. Hash files

I

  • immutable / 81. Complex numbers
  • infinite monkey theorem / 82. Dawkins' weasel
  • initialization vector (IV) / 98. Encrypt and decrypt strings
  • integration / 25. Monte Carlo integration

L

  • Langton's Ant / 85. Langton's Ant, 85. Langton's Ant
  • least common multiple (LCM) / 9. Least common multiples, 9. Least common multiples
  • legs / 27. Trapezoid rule integration
  • line-circle intersection / 34. Line-circle intersection, 34. Line-circle intersection
  • line-line intersection / 29. Line-line intersection, 29. Line-line intersection
  • local time zone clocks / 46. Local time zone clocks, 46. Local time zone clocks
  • lock object / 77. Parallel primes tuple
  • longest common substring / 63. Longest common substring

M

  • match points / 61. Edit distance
  • mathematics, problems
    • about / Problems
    • statistical functions /
    • permutations / 2. Permutations
    • combinations / 3. Combinations
    • factorials / 4. Factorials
    • fibonacci numbers / 5. Fibonacci numbers
    • binomial coefficient / 6. Binomial coefficients
    • Pascal's triangle / 7. Pascal's triangle
    • greatest common divisor / 8. Greatest common divisors
    • least common multiple / 9. Least common multiples
    • sum of multiples / 10. Sums of multiples
    • primality testing / 11. Primality testing
    • prime table / 12. Prime table
    • prime factors / 13. Prime factors
    • unique prime factors / 14. Unique prime factors
    • prime tuples / 15. Prime tuples
    • proper divisors / 16. Proper divisors
    • amicable numbers / 17. Amicable numbers
    • perfect number / 18. Perfect numbers
    • Armstrong number / 19. Armstrong numbers
  • mathematics, solutions
    • about / Solutions
    • statistical functions / 1. Statistical functions
    • permutations / 2. Permutations
    • combinations / 3. Combinations
    • factorials, calculating / 4. Factorials
    • Fibonacci numbers, calculating / 5. Fibonacci numbers
    • Binomial coefficients, calculating / 6. Binomial coefficients
    • Pascal's triangle / 7. Pascal's triangle
    • greatest common divisors (GCD) / 8. Greatest common divisors
    • least common multiples / 9. Least common multiples
    • sum of multiples / 10. Sums of multiples
    • sums of multiples / 10. Sums of multiples
    • primality testing / 11. Primality testing
    • prime table / 12. Prime table
    • prime factors / 13. Prime factors
    • unique prime factors / 14. Unique prime factors
    • prime tuples / 15. Prime tuples
    • proper divisors / 16. Proper divisors
    • amicable numbers / 17. Amicable numbers
    • perfect numbers / 18. Perfect numbers
    • Armstrong numbers / 19. Armstrong numbers
  • meetings
    • scheduling / 44. Scheduling meetings, 44. Scheduling meetings
  • midpoint rule / 26. Rectangle rule integration
  • modulus / 81. Complex numbers
  • Monte Carlo algorithm / 20. Monte Carlo π, 20. Monte Carlo π
  • Monte Carlo integration / 25. Monte Carlo integration, 25. Monte Carlo integration
  • Multipurpose Internet Mail Extensions (MIME) / 72. Compressing images

N

  • Newton's method / 21. Newton's π, 23. Newton's method
  • Newton-Raphson method / 23. Newton's method
  • norm / 81. Complex numbers
  • Not a Number (NaN) / 21. Newton's π

P

  • palindromic substrings / 59. Palindromic substrings, 59. Palindromic substrings
  • parametric equation / 29. Line-line intersection
  • Pascal's triangle / 7. Pascal's triangle, 7. Pascal's triangle
  • passwords
    • validating / 60. Validating passwords, 60. Validating passwords
  • perfect number / 18. Perfect numbers, 18. Perfect numbers
  • permutations / 2. Permutations, 2. Permutations
  • perpendicular / 28. Arrowheads
  • phase / 81. Complex numbers
  • point-line distance / 30. Point-line distance, 30. Point-line distance
  • point-segment distance / 31. Point-segment distance, 31. Point-segment distance
  • point in polygon / 38. Point in a polygon
  • polygon area / 37. Polygon area, 37. Polygon area
  • primality testing / 11. Primality testing, 94. Primality testing, redux, 94. Primality testing, redux
  • prime factors / 13. Prime factors, 13. Prime factors
  • prime number / 11. Primality testing
  • prime table / 12. Prime table
  • prime tuples / 15. Prime tuples
  • problems, dates and times
    • about / Problems
    • week days, displaying / 41. Days of the week
    • DateTimePicker control / 42. Date and time picker
    • time zone chart / 43. Time zone chart
    • meetings, scheduling / 44. Scheduling meetings
    • time zone clocks / 45. Time zone clocks
    • local time zone clocks / 46. Local time zone clocks
    • duration, calculating / 47. Calculating duration
    • age, calculating / 48. Calculating age
  • proper divisors / 16. Proper divisors, 16. Proper divisors
  • pseudorandom techniques / 93. Cryptographic pseudorandom numbers
  • punctuation
    • removing / 58. Removing punctuation, 58. Removing punctuation

R

  • race condition / 76. Parallel primes table
  • randomization, problems
    • about / Problems
    • random doubles / 49. Random doubles
    • random items / 50. Random items
    • Randomize extension / 51. Randomize items
    • ChooseGroup extension methods / 52. Random groups
    • items, selecting with probabilities / 53. Choose items with probabilities
    • random passwords / 54. Random passwords
    • random walks / 55. Random walks
  • randomization, solutions
    • random doubles / 49. Random doubles
    • random items / 50. Random items
    • items, randomizing / 51. Randomize items
    • random groups / 52. Random groups
    • items, selecting with probabilities / 53. Choose items with probabilities
    • random passwords / 54. Random passwords
    • random walks / 55. Random walks
  • rectangle rule / 26. Rectangle rule integration
  • rectangle rule integration / 26. Rectangle rule integration
  • Riemann sum / 26. Rectangle rule integration
  • Roman numerals / 56. Roman numerals, 56. Roman numerals
  • root-finding algorithms / 22. Bisection root-finding
  • row operation / 24. Gaussian elimination

S

  • segment-segment distance / 32. Segment-segment distance, 32. Segment-segment distance
  • sexy primes / 15. Prime tuples
  • Sharks and Fish / 87. Sharks and Fish, 87. Sharks and Fish
  • simulations, problems
    • about / Problems
    • Dawkins' weasel / 82. Dawkins' weasel
    • Hailstone sequence / 83. Hailstone sequence
    • hailstone sequence, visualizing / 84. Hailstone sequence, Redux
    • Langton's Ant / 85. Langton's Ant
    • Life / 86. Life
    • Sharks and Fish / 87. Sharks and Fish
    • slingshot / 88. Slingshot
    • Slingshot refinements / 89. Slingshot refinements
    • Space Force / 90. Space Force
  • simulations, solutions
    • about / Solutions
    • Dawkins' weasel / 82. Dawkins' weasel
    • Hailstone sequence / 83. Hailstone sequence
    • hailstone sequence, visualizing / 84. Hailstone Sequence, Redux
    • Langton's Ant / 85. Langton's Ant
    • Life / 86. Life
    • Sharks and Fish / 87. Sharks and Fish
    • Slingshot / 88. Slingshot
    • Slingshot refinements / 89. Slingshot refinements
    • Space Force / 90. Space Force
  • Slingshot
    • about / 88. Slingshot, 88. Slingshot
    • refinements / 89. Slingshot refinements, 89. Slingshot refinements
    • projectile motion / Projectile motion
    • example solution / Example solution
  • solutions, dates and times
    • about / Solutions
    • MonthCalendar control / 41. Days of the week
    • DateTimePicker control / 42. Date and time picker
    • time zone chart / 43. Time zone chart
    • meetings, scheduling / 44. Scheduling meetings
    • time zone clocks / 45. Time zone clocks
    • local time zone clocks / 46. Local time zone clocks
    • duration, calculating / 47. Calculating duration
    • age, calculating / 48. Calculating age
  • Soundex algorithm / 62. Soundex
  • Space Force
    • about / 90. Space Force, 90. Space Force, Other details
    • Sprite classes / Sprite classes
    • Bubble / Bubble
    • Ship class / Ship
    • Keyboard events / Keyboard events
  • Stars / 40. Stars
  • statistical functions
    • about / 1. Statistical functions
    • truncated mean /
    • median /
    • mode /
    • sample standard deviation /
    • population standard deviation /
  • steganography / 97. Steganography, 97. Steganography
  • strings
    • encrypting / 98. Encrypt and decrypt strings, 98. Encrypt and decrypt strings
    • decrypting / 98. Encrypt and decrypt strings, 98. Encrypt and decrypt strings
  • strings, problems
    • Roman numerals / 56. Roman numerals
    • bytes, to hex / 57. Bytes to hex
    • punctuation, removing / 58. Removing punctuation
    • palindromic substrings / 59. Palindromic substrings
    • passwords, validating / 60. Validating passwords
    • edit distance / 61. Edit distance
    • Soundex algorithm / 62. Soundex
    • longest common substring / 63. Longest common substring
  • strings, solutions
    • Roman numerals / 56. Roman numerals
    • bytes, to hex / 57. Bytes to hex
    • punctuation, removing / 58. Removing punctuation
    • palindromic substrings / 59. Palindromic substrings
    • passwords, validating / 60. Validating passwords
    • edit distance / 61. Edit distance
    • Soundex, encoding / 62. Soundex
    • longest common substring / 63. Longest common substring

T

  • time zone chart / 43. Time zone chart, 43. Time zone chart
  • time zone clocks / 45. Time zone clocks, 45. Time zone clocks
  • trapezoid / 27. Trapezoid rule integration
  • trapezoid rule integration / 27. Trapezoid rule integration
  • twin primes / 15. Prime tuples

U

  • unique prime factors / 14. Unique prime factors, 14. Unique prime factors

V

  • Vigenère cipher / 92. Vigenère cipher, 92. Vigenère cipher

W

  • watermarking / 97. Steganography
  • weasel program / 82. Dawkins' weasel
  • wondrous numbers / 83. Hailstone sequence
lock icon The rest of the chapter is locked
arrow left Previous Section
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime