首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

请教,dll文件为什么不能MessageBox.Show()

2012-12-14 
请问,dll文件为什么不能MessageBox.Show()创建一个dll文件,如下:using Systemusing System.Collections.G

请问,dll文件为什么不能MessageBox.Show()
创建一个dll文件,如下:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
namespace aaaaa
{
    public class Person
    {
        public void Say()  
        {           
           MessageBox.Show("dfgfg");            
        }       
    }
}


不能使用MessageBox,为什么?
添加using System.Windows.Forms;也不能添加,为什么?
[最优解释]
先要引用Systen.Windows.Forms库。
[其他解释]
先在工程中引用 System.Windows.Forms.dll

热点排行