Why can not I enter my code?

advertisements

When writing out a property in visual studio, the IDE autocompletes the wrong text and interrupts my flow.

class Person
{
    private int age;
    public int Age;
{
   AppDomainSetup //

}

AppDomainSetup is given when I've typed set. Why is the IDE confused?


You should remove ; after "Age".

It is:

internal class Person
{
    private int age;
    public int Age { set; get; }
}