Welcome to MSDN Blogs Sign in | Join | Help

Kick Off the Blog with a TryParse sample!

Well, I though I would kick off the BCL blog with a sample of TryParse. TryParse methods have been added to all the base datatypes in Whidbey (previously, TryParse was only available on the Double type). The TryParse demo is available on the new BCL website. The demo allows you to compare the speed of Parse on certain types, to TryParse, and clearly demonstrates why you should prefer TryParse!
Published Wednesday, October 22, 2003 6:20 PM by BCLTeam
Filed under: ,

Comments

Monday, November 03, 2003 10:21 AM by Frank Hileman

# RE: Kick Off the Blog with a TryParse sample!

I am very happy to see this being addressed!
Friday, November 07, 2003 3:31 PM by Kit George [MSFT]

# RE: Kick Off the Blog with a TryParse sample!

Thanks Frank!
Friday, January 23, 2004 11:43 AM by julie lerman

# re: Kick Off the Blog with a TryParse sample!

Hey Kit, if I wanted to categorize parse and tryparse, are they from the Microsoft.Jscript.IParseText interface?
Friday, March 26, 2004 10:08 AM by www.xaml.net

# re: Kick Off the Blog with a TryParse sample!

I guess TryParse is a Whidbey feature, in .net 1.1, this works:

Regex.IsMatch(datapointer, @"^[-+]?[0-9]\d*\.?[0]*$")
Monday, May 31, 2004 1:42 PM by C# Frequently Asked Questions

# re: How do I cast a string to an int, float, double, etc?

Tuesday, October 05, 2004 3:27 PM by Kirk Allen Evans' Blog

# CSharpStudyGroup Follow Up

# TryParse and the Exception Tax « Articulos en venta en Mercado Libre

New Comments to this post are disabled
 
Page view tracker