using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Test1
{
public unsafe void Test()
{
Int32[] a = new Int32[100];
for (Int32 i = 0; i < 100; i++)
{
a[i] = i;
}
fixed (Int32* p = a)
{
Int32* q = p + 80;
for (Int32 i = 0; i < 20; i++)
{
Console.WriteLine(q[i]);
}
// Trace.Write(q[i]);
}
}
static void Main(string[] args)
{
Test1 T = new Test1();
T.Test();
Console.ReadLine();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Test1
{
public unsafe void Test()
{
Int32[] a = new Int32[100];
for (Int32 i = 0; i < 100; i++)
{
a[i] = i;
}
fixed (Int32* p = a)
{
Int32* q = p + 80;
for (Int32 i = 0; i < 20; i++)
{
Console.WriteLine(q[i]);
}
// Trace.Write(q[i]);
}
}
static void Main(string[] args)
{
Test1 T = new Test1();
T.Test();
Console.ReadLine();
}
}
}
相关文章:http://hi.baidu.com/sflypig/blog/item/db580c08f089c9d362d986c0.html