T
TonyJ
Hello!
Assume I have the two classes Test1 and Test2. They are very similar.
Test1 initialize the instance variable in the C-tor but
Test2 initialize the instance variable without using the C-tor.
Both classes can be seen below.
In this simple example it doesn't matter because Test1 is the same as Test2.
Do you agree with me.
class Test1
{
delegate double DoCalculation(double num);
private DoCalculate[] calculation;
private int calculationCounter;
public Test()
{
calculationCounter = 0;
calculation = new DoCalculation[10];
}
}
class Test2
{
delegate double DoCalculation(double num);
private DoCalculate[] calculation = new DoCalculation[10];
private int calculationCounter = 0;
}
//Tony
Assume I have the two classes Test1 and Test2. They are very similar.
Test1 initialize the instance variable in the C-tor but
Test2 initialize the instance variable without using the C-tor.
Both classes can be seen below.
In this simple example it doesn't matter because Test1 is the same as Test2.
Do you agree with me.
class Test1
{
delegate double DoCalculation(double num);
private DoCalculate[] calculation;
private int calculationCounter;
public Test()
{
calculationCounter = 0;
calculation = new DoCalculation[10];
}
}
class Test2
{
delegate double DoCalculation(double num);
private DoCalculate[] calculation = new DoCalculation[10];
private int calculationCounter = 0;
}
//Tony