Equivalent of Array keyword ?

  • Thread starter Thread starter Lionel
  • Start date Start date
L

Lionel

Hi,

I have found an example in VB6 i need to *convert* in C#.
My only problem is this line:
textItemRef.Position = Array(0.75, 0.75)

So, how do i convert this in C# ?

Thanks !
 
hi

you can do it like this
double[] d=new double[]{0.75, 0.75} ;

change the type as you wish

regards
Ansil
Trivandrum
 
Hi Lionel,

In addition to already posted responses...

VB6 is COM-centric, and the Array function produces a kind of VARIANT (a COM
data type) which is known as "variant array". So, if you need to construct
such a thing in .NET, I'd stick to an array of System.Object rather than an
array of doubles.
 
Back
Top