ToTimeSpan() static public method

static public ToTimeSpan ( byte buffer, int offset, int count ) : System.TimeSpan
buffer byte
offset int
count int
return System.TimeSpan
Example #1
0
 public TimeSpan ToTimeSpan()
 {
     if (_type == ValueHandleType.TimeSpan)
     {
         return(new TimeSpan(GetInt64()));
     }
     if (_type == ValueHandleType.UTF8)
     {
         return(XmlConverter.ToTimeSpan(_bufferReader.Buffer, _offset, _length));
     }
     return(XmlConverter.ToTimeSpan(GetString()));
 }
Example #2
0
 public TimeSpan ToTimeSpan()
 {
     if (this.type == ValueHandleType.TimeSpan)
     {
         return(new TimeSpan(this.GetInt64()));
     }
     if (this.type == ValueHandleType.UTF8)
     {
         return(XmlConverter.ToTimeSpan(this.bufferReader.Buffer, this.offset, this.length));
     }
     return(XmlConverter.ToTimeSpan(this.GetString()));
 }