C# Structures, Constructors and Unmanaged Code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a C# class library to interface to unmanaged code in a DLL.
Everything is working fine. In some cases, I have structures passed by value
or reference (out or ref). In some cases, there are structures within
structures.
These structures were defined by the designer of the DLL. What I'm wondering
is, can I add a constructor in C# to the structure definition, without
screwing up the interface between managed and unmanaged code?
Thanks in advance for the help,
Dennis
 
What I'm wondering
is, can I add a constructor in C# to the structure definition, without
screwing up the interface between managed and unmanaged code?

Yes, you can add any method you want, including constructors.



Mattias
 
Back
Top