Using pointers to structure in C#.

I get an error 'Cannot take the address of, or get size, declare a pointer to a managed type' on the line "MyStruct* pMystruct", I have been trying to find out a solution out of this, but in vain.

please help me out with this one.

thanks in advance.

The error message is quite clear. The compiler does not allow pointers to managed types. All native objects are managed in .Net.
Are you sure you need a pointer? What are you trying to do?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.