Jump to content

Array as Argument

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
xarzu

xarzu

    Newbie

  • Members
  • PipPip
  • 14 posts
How do you pass an array of integers as an argument to a method in C#?

#2
Lop

Lop

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,172 posts
To a function?

System.Array myArray;
myArray = {"a","b"};

myFunc(myArray);

public static myFunc(System.Array myArray)
{
    ..... Code
}