Quite logical actually.
Let us assume that you are initializing the struct with an array of
integers....
which code segment do you expect that the run time calls? Passing an array
of integers would satisfy the signatures of both the constructors.
That is why we get an error....
-D
"Aleksei Guzev" <al***********@bigfoot.com> wrote in message
news:op**************@News.CIS.DFN.DE...
Hi,
I have the following code:
public struct IntegerList
{
ArrayList _rep;
public IntegerList( int [] vals )
{
_rep = new ArrayList( vals );
}
public IntegerList( params int[] v )
{
_rep = new ArrayList( v );
}
}
Why the compiler treats the constructors as ones having the same parameter
types? (CS0111)
Aleksei Guzev