假设在在我们的vs环境新建一个类 copy以下代码,表面看好像一切都没有问题。

 using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks; namespace yaou.Data.DomainModels
{
[Table("coupon_setting")]
public class coupon_setting
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int id { get; set; } [MaxLength()]
public string title { get; set; } public DateTime get_started_on { get; set; } public DateTime get_end_on { get; set; } [DataType(DataType.Date)]
public DateTime started_on { get; set; } [DataType(DataType.Date)]
public DateTime end_on { get; set; } public virtual category category { get; set; } public int amount { get; set; }
}
}

同时创建两个属性 一个为get_started_on 一个为started_on;

立马报错。

错误 CS0102 类型“coupon_setting”已经包含“get_started_on”的定义。

开什么玩笑,微软大哥?

期待大家参与,给出答案。

Visual Studio 下C#编译器在解析属性名时如果增加一个get_[您的另一个已经包含在类中属性名]的属性会报错,微软大哥这是什么鬼?的更多相关文章

  1. Visual Studio下__cplusplus宏为199711L的问题

    Visual Studio下__cplusplus宏为199711L的问题 / Zc:__ cplusplus(启用更新的__cplusplus宏) 该/ ZC:__ CPLUSPLUS编译器选项使_ ...

  2. Cocos开发中Visual Studio下HttpClient开发环境设置

    Cocos2d-x 3.x将与网络通信相关的类集成到libNetwork类库工程中,这其中包括了HttpClient类.我们需要在Visual Studio解决方案中添加libNetwork类库工程. ...

  3. Cocos开发中Visual Studio下libcurl库开发环境设置

    我们介绍一下win32中Visual Studio下libcurl库开发环境设置.Cocos2d-x引擎其实已经带有为Win32下访问libcurl库,Cocos2d-x 3.x中libcurl库文件 ...

  4. Visual Studio下SQLite数据库开发环境设置

    由于我们介绍的内容都是基于微软的Visual Studio下开发的Win32平台,所以下边我们介绍Visual Studio下SQLite数据库开发环境设置.具体而言我们有两种方式可以在Visual ...

  5. Cocos发展Visual Studio下一个libcurl图书馆开发环境的搭建

    我们解释win32在Visual Studio下一个libcurl图书馆开发环境的搭建.Cocos2d-x发动机实际上与Win32在访问libcurl库.Cocos2d-x 3.x在libcurl库文 ...

  6. Cocos发育Visual Studio下一个HttpClient开发环境设置

    Cocos2d-x 3.x相关类集成到网络通信libNetwork图书馆project于.这其中包括:HttpClient分类. 我们需要在Visual Studio溶液中加入libNetwork图书 ...

  7. 推荐SQL Server Management Studio以及Visual Studio下的免费的插件 ApexSQL Complete

    SQL Server 并没有代码格式化的工具,对于处理他人编写的长SQL需要手工的格式化是一件麻烦的事情. 推荐SQL Server Management Studio以及Visual Studio下 ...

  8. Android Studio下的简单网页解析

    Android Studio下的简单网页解析 一.导入数据 导入前添加依赖 implementation 'org.jsoup:jsoup:1.11.3' 使用字符串导入 String html = ...

  9. Visual.Studio.2013.IDE+visual.studio.15.preview5 编译器

    硬盘版Visual.Studio.2013.IDE + visual.studio.15.preview5 编译器 使用前注意以下事项: 1.右键-管理员权限安装,VS15补丁.exe,补丁是VS15 ...

随机推荐

  1. 使用rem来开发你的移动端网站

    what is rem ? )css3中的计量元素大小的单位,类似px.pt.em. )一种相对根元素font-size的计算方式.1rem = <html>'s font-size px ...

  2. Mysql 5.7.12 配置

    打算用express+mysql写一个博客.本来在公司电脑已经配置好了的,但是为了方便在家里也能修改,所以在自己的电脑里也安装好环境. 公司电脑是win7系统32位的,安装的是5.5的mysql,用的 ...

  3. Adroid 展开收起效果实现

    Layout <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns ...

  4. 被滥用的for in循环

    众所周知,javascript中有两种for循环,一种是: var a=['this','is','a','article'], i, len; for( i = 0,len = a.length;i ...

  5. Linux 命令——grep | 正则表达式

    感觉讲的很详细,瞬间懂了grep,正则. from: here 简介 grep (global search regular expression(RE) and print out the line ...

  6. java.nio.file.Path

    public interface Path extends Comparable<Path>, Iterable<Path>, Watchable 1. A Path repr ...

  7. 含有多个main方法的jar包的运行方式(适用于用java写的工具类)

    如果一个jar中含有多个主程序,而你没有配置默认主程序,或者想要运行指定主程序,则可以通过如下命令执行: Java -cp example03-1.0-SNAPSHOT.jar cn.vicky.ex ...

  8. MYSQL 模糊查询

    下面介绍mysql中模糊查询的四种用法: 1,%:表示任意0个或多个字符.可匹配任意类型和长度的字符,有些情况下若是中文,请使用两个百分号(%%)表示. 比如 SELECT * FROM [user] ...

  9. Name jdbc is not bound in this Context

    简介 今天接手中行一个交通罚款web工程时,从svn同步下来后,,启动竟然报找不到数据源错误,本来以为很简单解决找了两个小时,现在记录下来. Exception: Name jdbc is not b ...

  10. git的常用命令

    简介  上篇讲解git的博客,在centos6.5中安装完成了github客户端,接下来我们来熟悉git的操作命令 1.查看自己机器中安装的git版本 [root@jacky conf]# git - ...