variable argument list

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Hi,

how can I use variable argument lists in C++.NET (cfr 'params' in C#) ?

thnx

Chris
 
Hi Chris,
how can I use variable argument lists in C++.NET (cfr 'params' in C#) ?

While you can define in Managed C++ a method that looks to C# as a variable
argument list (by using the ParamsAttribute attribute), there's no direct
syntax in the language to call one, so you need to manually create an array
first and then pass that.
 
Tomas Restrepo (MVP) said:
Hi Chris,


While you can define in Managed C++ a method that looks to C# as a variable
argument list (by using the ParamsAttribute attribute), there's no direct
syntax in the language to call one, so you need to manually create an array
first and then pass that.

Opps, I meant [ParamsArray] attribute, not Params.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top