A "Serialization" bug?

Here’s codes in Visual Studio 2008 and Unity3d.
And it’s tested in win 7 64bit/win Xp 32bit , and the unity3d version is 3.2 pro,
The code run in VS perfectly and Nothing wrong ,but in unity3d,
It warned me that “NullReferenceException”,Is it a bug or I did something wrong in the code?
Please give me some help,thx…

here’s the code:
Code in VS:
http://webgarden.vacau.com/u3dtest/vs.html

Code in Unity3d:
http://webgarden.vacau.com/u3dtest/unity3d.html

Some snippet from docs

Unity will serialize all your script components, reload the new assemblies, and recreate your script components from the serialized versions. This serialization does not happen with .NET’s serialization functionality, but with an internal Unity one.

So this would explain the different behaviors. What happens if you have a 1-dimensional array that you try to serialize?