有人能解释一下这段代码吗? [英] Can someone explain me this code?
问题描述
private void ImportIcon_Click(object sender,EventArgs e)
      {
          Stream MyStream;
          OpenFileDialog openFileDialog1 = new OpenFileDialog();
          if(openFileDialog1.ShowDialog()== System.Windows.Forms.DialogResult.OK)
          {
              if((MyStream = openFileDialog1.OpenFile())!= null)
              {
                  string strfilename = openFileDialog1.FileName;
                  string filetext = File.ReadAllText(strfilename);
                  TitleBox.Text = filetext;
              }¥b $ b                
              }¥b $ b           }
private void ImportIcon_Click(object sender, EventArgs e)
{
Stream MyStream;
OpenFileDialog openFileDialog1 = new OpenFileDialog();
if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
if ((MyStream = openFileDialog1.OpenFile()) != null)
{
string strfilename = openFileDialog1.FileName;
string filetext = File.ReadAllText(strfilename);
TitleBox.Text = filetext;
}
}
}
推荐答案
告诉我们您的理解。您需要帮助查找文档吗?您需要能够使用该文档。告诉我们你到目前为止学到了什么。
Tell us what you do understand. Do you need help finding the documentation? You need to be able to use the documentation. Tell us what you have learned so far.
这篇关于有人能解释一下这段代码吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!