Class property is a 'property' but is used like a 'type'
c#
Solution
You can't place these type of assignment statements inside the open class context. You can only make these type of assignments inside a method. The only assignments that can be done in the class context are initializations of class level fields.
If this assignment needs to be made when the class is instantiated, then it should be done in the constructor.
Problem
I created a class call Sales with a Amount get/set: ``` class Sales { public static string Amount { get; set; } } ``` Then I called from other class, out of a function scope: ``` class Test { Sales.Amount = "10"; public static VoidSales() { ..... } } ``` I get the following error: ``` 'Fun.Sales.Amount' is a 'property' but is used like a 'type' ``` But When I use in a function, it is correct. Thank you.