Skip to Main Content
.NET Core 2.0 By Example
book

.NET Core 2.0 By Example

by Neha Shrivastava, Rishabh Verma
March 2018
Beginner to intermediate content levelBeginner to intermediate
458 pages
10h 34m
English
Packt Publishing
Content preview from .NET Core 2.0 By Example

DLLImport attribute

The attribute, [DllImport()], falls under the DllImportAttribute class. It provides the information required to call a function exported from an unmanaged DLL. The minimum prerequisite is that we should pass the name of the DLL which contains the entry point. We can apply this attribute straightforwardly to C# and C++ function definitions. Let's check what the DllImport attribute has inside it. In the code window, click on DllImport and press the F12 key (referred to as the go-to definition). This key is bound to the de-compile command in Visual Studio and will de-compile the selected type, if it can. Upon de-compilation, Visual Studio will display the de-compiled code in a new window. In the de-compiled code of DllImport ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

ASP.NET Core 3 and React

ASP.NET Core 3 and React

Carl Rippon
Enterprise Application Development with C# 9 and .NET 5

Enterprise Application Development with C# 9 and .NET 5

Ravindra Akella, Rishabh Verma, Arun Kumar Tamirisa, Suneel Kumar Kunani, Bhupesh Guptha Muthiyalu

Publisher Resources

ISBN: 9781788395090Supplemental Content