|
using System;
class MyClass {
public static void Main() {
TestClass Obj = new TestClass();
Obj.fun();
}
}
class TestClass {
public unsafe void fun() {
int [] iArray = new int[10];
// store value in array
for (int iIndex = 0; iIndex < 10; iIndex++) {
iArray[iIndex] = iIndex * iIndex;
}
testFun(iArray);
}
public unsafe void testFun(int [] p_iArray) {
// get value from array
for (int iIndex = 0; iIndex < 10; iIndex++) {
Console.WriteLine(p_iArray[iIndex]);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.