System.Xml.Serialization.XmlCustomFormatter.ToTime C# (CSharp) 메소드

ToTime() 정적인 개인적인 메소드

static private ToTime ( string value ) : System.DateTime
value string
리턴 System.DateTime
        internal static DateTime ToTime(string value)
        {
            if (!LocalAppContextSwitches.IgnoreKindInUtcTimeSerialization)
            {
                return DateTime.ParseExact(value, s_allTimeFormats, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite | DateTimeStyles.NoCurrentDateDefault | DateTimeStyles.RoundtripKind);
            }
            else
            {
                return DateTime.ParseExact(value, s_allTimeFormats, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite | DateTimeStyles.NoCurrentDateDefault);
            }
        }

Usage Example

예제 #1
0
 protected static DateTime ToTime(string value)
 {
     return(XmlCustomFormatter.ToTime(value));
 }