C # string search in Notepad

Source: Internet
Author: User

Oracle Text Processing 1.0

This program is compiled and written in c‑language. To use this program, you must change the name of this document to 1.txt.

Development Statement: This program is not completed independently, but with the help of unknown friends.

Function implementation:

1. Enter the Oracle ID to display relevant information;

2. displays the number of input Oracle information.

The source code is as follows:

Using system; using system. collections. generic; using system. componentmodel; using system. data; using system. drawing; using system. text; using system. windows. forms; using system. io; namespace Oracle Text Processing 1. _ 0 {public partial class form1: FORM {public form1 () {initializecomponent ();} private void button#click (Object sender, eventargs e) {textbox2.text = ""; label2.text = ""; int I = 0, m = 0; int num = 0; strin G [] filelist = file. readalllines ("1.txt", encoding. default); For (INT linenum = 0; linenum <= filelist. length-1; linenum ++) {If (filelist [linenum]. indexof ("ID =" + textbox1.text)>-1) {I ++; if (I = 1) {for (INT lin = num + 2; Lin <= linenum; lin ++) {textbox2.appendtext (filelist [Lin] + "\ n") ;}} if (filelist [linenum]. indexof ("ID")>-1) {M ++; num = linenum ;}} string SJ = convert. tostri Ng (m); label2.text = "1.txt file Oracle information has been added" + SJ + "record! ";}}}

Program:

Program: http://pan.baidu.com/s/1o60V0Ci password: 1rxn

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.