2014-04-20

在一個窗體裏面調用另一個窗體的控件
需要把該控件的modifiers屬性設置爲public


判斷字符是否在某字符串中
string Type = "10020.10021.10025.10026";
            string fileType = "10026";
             if (Type.Contains(fileType))   //判斷Type 數組是否包含了fileType字符串
            {
                MessageBox.Show("在裏面呢"); 
            }




DialogResult result=MessageBox.Show("內容", "標題", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if(result==DialogResult.OK)
{
    //確定按鈕的方法
}
else
{
    //取消按鈕的方法
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章