Jump to content

Photo

Quickly create literal arrays, how?

papyrus

  • Please log in to reply
No replies to this topic

#1
RaidersClamoring

RaidersClamoring

    Enthusiast

  • Premium Member
  • 168 posts

I hope I'm missing something but is there really no way to declare and create an array doing something like this;

int[] myArray = new {1, 2, 3, 4, 5, 6}

 

Or maybe ([1], [2], [3], [4], [5], [6])

 

I know the syntax is wrong, this should be viewed as pseudocode, I hope you get what I mean.

 

 

Because this 

 

int[] myArray = new int[6]

myArray[0] = 1

myArray[1] = 2

And so on, is so damned slow.







Also tagged with one or more of these keywords: papyrus

IPB skins by Skinbox
Page loaded in: 0.993 seconds