After more than 30 years running websites and forums I am retiring.
I have made many friends through the years. I will cherish my time getting to know you. I wish you all the best. This was not an easy decision to make. The cost to keep the communities running has gotten to the point where it's just too expensive. Security certificates, hosting cost, software renewals and everything else has increased threefold. While costs are up ad revenue is down. It's no longer viable to keep things running.
All sites will be turned off on Thursday 30 November 2023. If you are interested in acquiring any of the websites I own you can Email Schwarz Network.
Thanks for the response. Any idea how you do this? like a small sample of some sort to get me going. Appreciate it if you could.Nerseus said:Typically you have to write your own function for this. The function is normally written with a Try/Catch that attempts the conversion. If it converts, the function returns true. If it doesn't, it returns false.
Depending on the type of numeric you want to return true (whole numbers only, floats, "$" and "," chars), you'll have to pick the right conversion function.
-nerseus
[COLOR=DarkSlateBlue]try[/COLOR]
{
i = System.Int32.Parse(text, System.Globalization.NumberStyles.Currency);
[COLOR=DarkOrchid] // Parse the text according to currency standards.
// If it cannot be parsed, an exception is thrown.
// Going to the catch block. [/COLOR]
MessageBox.Show("Conversion succeeded." + System.Convert.ToString(i));
}
[COLOR=DarkSlateBlue]catch[/COLOR] (System.Exception ex)
{
[COLOR=DarkOrchid]// If text cannot be parsed.[/COLOR]
MessageBox.Show("Conversion failed.");
MessageBox.Show(ex.ToString());
};