In this program, You will learn how to implement parameterized constructor in C#.
public Test(int){
//statement
}
using System;
public class Test
{
public Test(int x)
{
Console.WriteLine("Parameterized constructor is called here:" + x);
}
public static void Main(string[] args)
{
Test test = new Test(10);
}
}
Parameterized constructor is called here:10