System.Xml.XmlConverter.ToDateTime C# (CSharp) Method

ToDateTime() static public method

static public ToDateTime ( byte buffer, int offset, int count ) : System.DateTime
buffer byte
offset int
count int
return System.DateTime
        static public DateTime ToDateTime(byte[] buffer, int offset, int count)
        {
            DateTime value;
            if (TryParseDateTime(buffer, offset, count, out value))
                return value;
            return ToDateTime(ToString(buffer, offset, count));
        }

Same methods

XmlConverter::ToDateTime ( System.Int64 value ) : System.DateTime
XmlConverter::ToDateTime ( string value ) : System.DateTime

Usage Example

示例#1
0
 public DateTime ToDateTime()
 {
     if (_type == ValueHandleType.DateTime)
     {
         return(XmlConverter.ToDateTime(GetInt64()));
     }
     if (_type == ValueHandleType.UTF8)
     {
         return(XmlConverter.ToDateTime(_bufferReader.Buffer, _offset, _length));
     }
     return(XmlConverter.ToDateTime(GetString()));
 }
All Usage Examples Of System.Xml.XmlConverter::ToDateTime