Search icon CANCEL
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 Paperback
Published in Oct 2018
Publisher Packt
ISBN-13 9781789535426
Length 362 pages
Edition 1st Edition
Languages
Tools
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

To get the most out of this book

Programming is best learned by doing rather than by reading, so I strongly encourage you to try to solve a problem before you look at my example solution later in the book. I've tried to include all of the information that you need to solve each problem in its description, so you should be able to take a crack at it before you look at my solution.

Even if you get stuck on a problem, the beginning of the solution's description may help you figure out how to solve it. If you experience an Ah ha! moment while you're reading about the solution, stop and give it another try.

Keep in mind that there are always multiple ways to solve any particular problem. Some solutions may be better than others, but most problems can be solved by several different approaches, so don't think your solution is wrong just because it's different from mine. In fact, yours may be better than mine.

The easiest way to read this book is from front to back, tackling each problem in order. The chapters are arranged so the less confusing topics come first. Similarly, the problems within each chapter are arranged with the less demanding first. Some of the material described in one problem's solution may also be used in a later solution, so reading the problems and their solutions in order makes sense.

However, the problems and their example solutions are described separately, so you can jump around if you like. For example, if you are particularly interested in steganography, you can jump straight to Chapter 9, Cryptography. The worst that will happen is that an example solution may refer you to an earlier solution for some of its details. You can then go back and read the earlier solution for further details.

Download the example code files

You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packt.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at www.packt.com.
  2. Select the SUPPORT tab.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/The-Modern-CSharp-Challenge. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Several of the solutions in earlier chapters used the Random class to generate random numbers."

A block of code is set as follows:

private int FindError(string string1, string string2)
{
int error = 0;
for (int i = 0; i < string1.Length; i++)
error += Math.Abs((int)string1[i] - (int)string2[i]);
return error;
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

{
string testSubstring = string1.Substring(startPos, length);
int testPos = string2.IndexOf(testSubstring);
if (testPos < 0) break;

bestLength = length;
bestSubstring = testSubstring;
}

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "In the Add Item dialog, I selected the MP3 file and clicked Add."

Warnings or important notes appear like this.
Tips and tricks appear like this.
lock icon The rest of the chapter is locked
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