Just to give an example:
public class User(){
private int userId;
publlic int UserId{
get { return userId}
public void User() : this(1000){}
public void User(int userId){
this.userId= userId
}
}
User user1 = new User();
Response.Write(user1.UserId); //will output 1000
notice how I call the constructor with no parameters, but UserId = 1000
that's because the User() constructor called the User(int userId)
constructor....
Karl
"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Constructor with no parameter DataCollection() will call another
constructor with a parameter DataCollection(defaultCapacity)
Eliyahu
"Raed Sawalha" <Ra*********@discussions.microsoft.com> wrote in message
news:E0**********************************@microsof t.com... I still beginner in C# and i wondering what below line (*) means
public abstract class DataCollection : ICollection, ISerializable,
IDeserializationCallback
{
private const int defaultCapacity = 8;
protected DataCollection() : this(defaultCapacity)
//(*) This Line why colon after constructor, What is means?
{
}
}