Home / Expert Answers / Computer Science / write-a-c-program-you-will-need-to-create-the-class-called-34-mytext-34-that-does-text-file-manipula-pa219

(Solved): Write a C# program, you will need to create the class called "MyText" that does text file manipulati ...



Write a C# program, you will need to create the class called "MyText" that does text file manipulation. Here are the operations:

Make sure the program contains all the criteria mentioned below:

One empty constructor and another is passed the name of the file

public MyText(){}
public MyText(string fileName){}?

Read and return the text file as a string

public string readTextFile()?

Find the occurrences of a substring in a file by returning a set containing the line numbers of where the substring is found

public List<int> findSubString(string str)?

Return the line string by line number

public string getLine(int lineNumber)?

Return the line number where the first occurrence of the substring is found and the column

public int substringFirstFind(string substring, out int col)?

Add a substring to any given line at a given location

// Insert any text at any location in any selected line
// the method returns bool which indicates success or not 
public bool insertSubstring(string str, int lineNumber, int col)?

Saving a copy of the original text file using a new fileName with any modificatoins from operation 6.

public bool saveCopy(string fileName)


We have an Answer from Expert

View Expert Answer

Expert Answer


The MyText class allows for text file manipulation. There are several different operations that can be performed on a text file
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe