for example:[DllImport("kernel32", SetLastError=true)]
static extern bool CreateDirectory(string name, SecurityAttribute sa);[DllImportAttribute("kernel32", SetLastError=true)]
static extern bool CreateDirectory(string name, SecurityAttribute sa);两种写法,我试过,执行起来都是一个道理。但是,从MSDN中,只能查到类DllImportAttribute的描述。但是,MSDN所有的举例,以前从网上查到的写法,处都使用DllImport这是什么道理??? 两种定义,到底有什么区别啊????问题解决,立即给分