DllImportAttribute and DllImport

  • Thread starter Thread starter csharp
  • Start date Start date
csharp said:
Is there any difference between this two?
There's only one. Attribute classes by convention end in "Attribute", but
when applying an attribute, you can leave it out. So [DllImportAttribute]
and [DllImport] are just two ways of writing the same attribute.
When to use which?
It's customary to use this ability to leave out "Attribute".
 
Back
Top