A
agro_r
I think I've found a bug on Microsoft Visual C# or maybe on the .NET
Framework itself... Look at this code:
using System;
public class Bar
{
public static void Main()
{
int[] a = {5, 4, 3, 2, 1};
unsafe
{
fixed(int* ptr = a)
{
int* reader = ptr;
while(true)
{
Console.Write("@ 0xX{0:X}is ", (uint)reader);
Console.WriteLine("{0}", *(reader--));
}
}
}
}
}
This code didn't throw an exception (which I expected), but the
program just terminates... Curiously, if we use "int a" instead of
"int[] a" and modify the rest of the program accordingly, the program
will indeed throw an exception. Does anyone know how I can contant
the .NET/C# team about this problem?
Framework itself... Look at this code:
using System;
public class Bar
{
public static void Main()
{
int[] a = {5, 4, 3, 2, 1};
unsafe
{
fixed(int* ptr = a)
{
int* reader = ptr;
while(true)
{
Console.Write("@ 0xX{0:X}is ", (uint)reader);
Console.WriteLine("{0}", *(reader--));
}
}
}
}
}
This code didn't throw an exception (which I expected), but the
program just terminates... Curiously, if we use "int a" instead of
"int[] a" and modify the rest of the program accordingly, the program
will indeed throw an exception. Does anyone know how I can contant
the .NET/C# team about this problem?