2017-04-26 8 views
0

XmlElementAttribute 및 DefaultValueAttribute로 장식 된 C# uint 속성이 있습니다.uint가있는 DefaultValueAttribute

Object of type 'System.Int32' cannot be converted to type 'System.UInt32'.

나는 문제가 DefaultValueAttribute가 사용하는 생성자가없는 것을 할 수있다 같아요

[XmlElement(typeof(uint), ElementName = "Delay")] 
[DefaultValue(0)] 
public uint Delay { get; set; } 

나는이 유형에 대한 스키마를 생성하는 XSD를 사용하려고, 다음과 같은 오류를 제공 매개 변수로서의 단위. 부호없는 정수에 대해 DefaultValue를 정의하려면 어떻게해야합니까?

답변

0
[DefaultValue(typeof(uint), "0")]