日期:2014-05-17  浏览次数:20819 次

很简单很简单的C#问题。。本人新手。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;


namespace WindowsFormsApplication1
{
  public partial class Form1 : Form
  {
  RWExcel rwExcel = new RWExcel(strFileName);
 

  public Form1()
  {
  InitializeComponent();
  }
   
  private void Form1_Load(object sender, EventArgs e)
  {

  }

  private void button2_Click(object sender, EventArgs e)
  {
   
  rwExcel.GetAndWrite(strFileName, strDesPath);
  }

  private void button1_Click(object sender, EventArgs e)
  {  

  rwExcel.GetExcelName();
  }

  private void button3_Click(object sender, EventArgs e)
  {
  rwExcel.ExportExcel(filepath, newname);
  }
  }
}


如何声明函数里的参数啊。。求助啊

------解决方案--------------------
C# code
string strFileName="你要设置的值";//注意类型对应
RWExcel rwExcel = new RWExcel(strFileName);

------解决方案--------------------
string strFileName = "xxxx";
RWExcel rwExcel = new RWExcel(strFileName);