Why can't I reference System.ComponentModel.DataAnnotations?

后端 未结 14 1729
遥遥无期
遥遥无期 2020-11-28 08:47

I\'m trying to use DataAnnotations in my WPF project to specify a maximum length of strings, with the following:

using System.ComponentModel.DataAnnotations;         


        
14条回答
  •  广开言路
    2020-11-28 09:27

    Use the FrameWork version 4.5 and above for your project then problem solved.Because this namespace is under 4.5 and above.

提交回复
热议问题