Skip to content

ITimeSpan conversion to float or int #291

Discussion options

You must be logged in to vote

Sorry if I wasn't clear what I'm trying to do. There is surprisingly little resources for this sort of thing so I appreciate what you've done here. I ended up just converting it to a string and then to a number. You're quite the one-man-band.

private float convertToFloat(ITimeSpan timeSpan){
return Int32.Parse(Regex.Match(timeSpan.ToString(), @"\d+").Value);
}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@TravisWoolston
Comment options

Answer selected by TravisWoolston
@melanchall
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Just question about the library
2 participants