Answers for "declare prop array c#"

C#
0

declare prop array c#

private int[] myNumbers;
public int[] MyNumbers
{
    get { return myNumbers; }
    set { myNumbers = value; }
}
Posted by: Guest on August-17-2020
0

declare prop array c#

class DemoClass
{
    public int[] MyNumbers { get; private set; }

    public DemoClass(int elements)
    {
        MyNumbers = new int[elements];
    }
}
Posted by: Guest on August-17-2020

C# Answers by Framework

Browse Popular Code Answers by Language