Problem With This C# Code?

Havnt really looked into but the following springs to mind:

  1. Rename your files (Form1.cs, Form2.cs, Form3.cs) to mean something.
  2. Your code isnt readable because its not commented!!! Comments are your friend. When i finished my project for uni i had thousands of lines of code and trying to understand something I write months ago was a pain because I left out comments.
  3. Possibly add a status bar at the bottom indicating current line number etc.
  4. Have option to add line numbers next to each line.
  5. Tabs?

A very neat little editor you have created. Have a gold star. :)
 
Last edited:
Mainly just what JonD said but I'd also add:
1. No forms/controls are meaningfully named or appear to follow any standards. i.e. TextBox1 should be named something like txtMain
findToolStripMenuItem should be mnuFind

2. The Click() events of buttons/menu items should not really contain lots of code, they should simply call another function, i.e.
mnuFindReplace should call findReplace(), and all code should reside there. It makes it MUCH easier to change code later, and to be able to call the same code from somewhere else (for example if you wanted to have a toolbar with icons, with your existing code youd have to call mnuFindReplace_Click() again, or copy-paste the code again which makes small changes to the code at a later date difficult to keep throughout the whole app)
 
Back
Top Bottom