M
msnews.microsoft.com
actaully the code i have written below is pretty simple and short. no
idea why it terminate at run-time with "An unhandled exception of type
'System.NullReferenceException' occurred"
Thank you
---code below---
using System;
class ANN
{
private int size;
private N[] nodes;
public ANN (int size)
{
this.size = size;
nodes = new N[size];
for ( int i = 0 ; i < size; i++)
{
nodes.GetType(); /*An unhandled exception of type
'System.NullReferenceException' occurred*/
}
}
static void Main()
{
ANN ann = new ANN(2);
}
};
class N
{
private int connectionCount;
private int [] connected;
private double [] weight;
private double bais;
public N() {
}
};
idea why it terminate at run-time with "An unhandled exception of type
'System.NullReferenceException' occurred"
Thank you
---code below---
using System;
class ANN
{
private int size;
private N[] nodes;
public ANN (int size)
{
this.size = size;
nodes = new N[size];
for ( int i = 0 ; i < size; i++)
{
nodes.GetType(); /*An unhandled exception of type
'System.NullReferenceException' occurred*/
}
}
static void Main()
{
ANN ann = new ANN(2);
}
};
class N
{
private int connectionCount;
private int [] connected;
private double [] weight;
private double bais;
public N() {
}
};