我对 C# 非常陌生,并且编写了相当笨重的代码。我在网上学习了很多课程,很多人都说解决问题的方法有多种。现在我制作了一个程序,它将加载 .Doc Word 文件,然后使用 if 语句搜索相关信息。
现在我的解决方案的问题是这个程序需要永远!!!我说的是 30 分钟 - 1 小时来完成以下代码。
有什么想法可以让我的小程序不那么笨重吗?我希望这个问题的解决方案能够大大增加我的知识,所以提前感谢大家!
问候克里斯
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApplication3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public int id = 0;
public int[] iD = new int[100];
public string[] timeOn = new string[100];
public string[] timeOff = new string[100];
public string[] dutyNo = new string[100];
public string[] …Run Code Online (Sandbox Code Playgroud) c# ×1