What is the meaning of ": base" in the constructor 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 12:03 UTC
Read the original article Hit count: 395

Filed under:
|
|

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

Related posts about c#

Related posts about .NET