|
private void Form1_Load(object sender, EventArgs e)
{
string s_FileName = "";
int FindPostion = 0;
bool bSave = false;
StringReader streamToPrint = null;
Font printFont;
public bool IfSaveOldFile()
{
bool ReturnValue=true;
if(bSave)
{
System.Windows.Forms.DialogResult dr;
string[]str=this.Text.Split('-');
dr=MessageBox.Show("文件"+str[0]+"文字已经改变.\n想保存文件吗?","记事本",MessageBoxButtons.YesNoCancel,MessageBoxIcon.Question);
switch(dr)
{
case System.Windows.Forms.DialogResult.Yes;
bSave=false;
if(s_FileName.Length!=0)
}
}
}
上面的一段代码中,前面已经声明了bSave和s_FileName变量,为什么提示说当前上下文中无此名称
|
|