Copying and Pasting cs Code

In cs, like in almost any computer programming language, reading data from a file can be tricky. You add extra lines of code to tell the computer what to do. Sometimes you can copy and paste these lines from other peoples’ code.

For example, you can follow the pattern in this listing:

         private void match(string query, string template)
         {
             Change_Resolution(query);
             Change_Resolution(template);
             // Loading fingerprints
             var fingerprintImg1 = ImageLoader.LoadImage(query);
             var fingerprintImg2 = ImageLoader.LoadImage(template);
             //// Building feature extractor and extracting features
             var featExtractor = new PNFeatureExtractor() { MtiaExtractor = new Ratha1995MinutiaeExtractor() };
             var features1 = featExtractor.ExtractFeatures(fingerprintImg1);
             var features2 = featExtractor.ExtractFeatures(fingerprintImg2);

             // Building matcher and matching
             var matcher = new PN();
             double similarity = matcher.Match(features1, features2);
             score = similarity.ToString("0.000");
             MessageBox.Show(similarity.ToString("0.000"));

         }