public string Encoding { get; set; } = "Text";
public string Category { get; set; } = "Free";
I have an error of token, '='.. What should I do?
Error : Invalid token '=' in class, struct, or interface member declaration
public string Encoding { get; set; } = "Text";
public string Category { get; set; } = "Free";
I have an error of token, '='.. What should I do?
Error : Invalid token '=' in class, struct, or interface member declaration
It seems your compiler does not support that approach. try assigning values in a constructor
as shared below.
public string Encoding { get; set; }
public string Category { get; set; }
public NAMEOFClASS()
{
this.Encoding="Text";
this.Category="Free"
}