troubleshooting Question

convert variant array to .net array

Avatar of zell71
zell71Flag for United Kingdom of Great Britain and Northern Ireland asked on
.NET ProgrammingC#
6 Comments1 Solution934 ViewsLast Modified:
hi,
i'm looking for a method to convert a variant array to a .net array.
basically, i have a .net DLL referenced in an Excel (vba) function which passes a variant array.
i need to convert it to a .net array (C# .net 3.5).
the array is passed into the following method:
        public void ConvertArray(object arr)
        {
            // do something
        }
i've read topics about Marshal.GetObjectForNativeVariant but unable to find a example to aid.
thanks,

ASKER CERTIFIED SOLUTION
Meir Rivkin
Full stack Software Engineer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros