c#中dll的调用问题????
using System.Runtime.InteropServices;
public class Libget
{
[DllImport("Sample.dll")]//引入dll
public static extern int ShowMe();//声明需要用到的dll中函数
}
/// <summary>
/// Class1 的摘要说明。
/// </summary>
class Class1
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main(string[] args)
{
//
// TODO: 在此处添加代码以启动应用程序
//
int a=0;
a = Libget.ShowMe();//showme函数返回值为1
Console.WriteLine("如a=1,即表示成功调用");
Console.Write("a=");
Console.WriteLine(a);
Console.Read();
}
运行时说找不到.ShowMe的入口点,不知道为什么???/
请各位指教,其中的dll我是用c#的类库编写的的
我知道可以用引用来添加,不过我现在想学习使用这种方式,我是初学者,请各位多多帮忙!!!!谢谢!!!!