Suppose you create a new class copy of the following code in our VS environment, it looks as if everything is fine.
1 usingSystem;2 usingSystem.Collections.Generic;3 usingSystem.ComponentModel.DataAnnotations;4 usingSystem.ComponentModel.DataAnnotations.Schema;5 usingSystem.Linq;6 usingSystem.Text;7 usingSystem.Threading.Tasks;8 9 namespaceYaou. Data.domainmodelsTen { One[Table ("coupon_setting")] A Public classcoupon_setting - { - [Key] the [Databasegenerated (databasegeneratedoption.identity)] - Public intID {Get;Set; } - -[MaxLength ( -)] + Public stringTitle {Get;Set; } - + PublicDateTime get_started_on {Get;Set; } A at PublicDateTime get_end_on {Get;Set; } - - [DataType (datatype.date)] - PublicDateTime started_on {Get;Set; } - - [DataType (datatype.date)] in PublicDateTime end_on {Get;Set; } - to Public VirtualCategory Category {Get;Set; } + - Public intAmount {Get;Set; } the } *}
Create two attributes at the same time one for get_started_on one for started_on;
Immediately error.
The error CS0102 type "Coupon_setting" already contains the definition of "get_started_on".
Are you kidding me, Big Brother Microsoft?
We look forward to your participation and give the answer.
The C # compiler in Visual Studio will error if you add a get_[property name that is already included in the class when parsing the property name, Microsoft Big Brother what the hell is this?