What is the meaning of ": base" in the costructor definition ?
Posted
by DotNetBeginner
on Stack Overflow
See other posts from Stack Overflow
or by DotNetBeginner
Published on 2010-03-29T09:45:35Z
Indexed on
2010/03/29
9:53 UTC
Read the original article
Hit count: 272
What is the meaning of ": base" in the costructor of following class(MyClass) ? Please explain the concept behind constructor definition given below for class MyClass.
public class MyClass: WorkerThread
{
public MyClass(object data): base(data)
{
// some code
}
}
public abstract class WorkerThread
{
private object ThreadData;
private Thread thisThread;
public WorkerThread(object data)
{
this.ThreadData = data;
}
public WorkerThread()
{
ThreadData = null;
}
}
© Stack Overflow or respective owner