I have decided to learn C# and since I have good knowledge of C++, I hope it would be easy.
I have faced an error I dont understand. It says Polygon' does not contain a constructor that takes '1' arguments (CS1729) AFAICS, all is well and constructor does take one argument. So C# maverick, help me on this as I'm confused.

using System;

class Polygon{
	string polygonName;
	Polygon(string pName){
		polygonName = pName;	

	public string getName(){
		return polygonName;	


class MainClass{
	public static void Main(){
		Polygon pg = new Polygon("Iam a Triangle");	

added public to a constructor and it worked.