Let us see the SET , GET with simple explanation

GET
The body of the get accessor is similar to that of a method. It must return a value of the property type.

SET
The set accessor is similar to a method whose return type is void. It uses an implicit parameter called value, whose type is the type of the property

class PDetails
{
private string name;ย  // the name field
public string Nameย ย ย  // the Name property
{
get { return name; }
set{ name = value; }
}
}

From Outer Class
PDetails obj = new PDetails();
obj .Name = “Joe”;ย  // the set accessor is invoked here

System.Console.Write(obj .Name);ย  // the get accessor is invoked here