Parsing Strings in C#.Net(usethecode.blogspot.com)

submitted by codeitwellcodeitwell(55) 3 years, 8 months ago

Parsing strings in any language can be a little bit difficult if you don't know the right way how to do that.

1 comment |category: |Views: 78

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by Tr3vTr3v(376) 3 years, 8 months ago 0

You'd be better off using .TryParse() for anything that supports it as it returns a boolean value indicating whether the parse was successful. In your example it works OK because your string only contains a numeric value, however if the string was alphanumeric you would get an exception thrown at runtime.

Reply

information Login or create an account to comment on this story