Newbie - what is the meaning of ":" in this code?

Z

Zalek Bloom

Here is part of this code:


public class Stack
{
readonly int m_Size;
int m_StackPointer = 0;
object[] m_Items;
public Stack():this(100)
{}
public Stack(int size)
{
......

what is the meaning of this command:
public Stack():this(100)
{}


Thanks,

Zalek
 
A

Arne Vajhøj

Here is part of this code:

public class Stack
{
readonly int m_Size;
int m_StackPointer = 0;
object[] m_Items;
public Stack():this(100)
{}
public Stack(int size)
{
.....

what is the meaning of this command:
public Stack():this(100)
{}

This constructor "calls" the other constructor.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top