I need to validate each of item formats below. Suppose user input Only One value a time, I must find out which format he/her input. I there any easy to approach it?
Thanks for your suggestions and comments.
.NET 2.0 installed. C# Used.
2 byte character
8 byte integer (signed)
1 byte integer (signed)
2 byte integer (signed)
4 byte integer (signed)
8 byte floating point
4 byte floating point
8 byte integer (unsigned)
1 byte integer (unsigned)
2 byte integer (unsigned)
4 byte integer (unsigned)
Use the
TryParsestatic methods of all of the following types:For characters, you will have to be more specific — do you want the input converted by character (e.g. if they enter
5the character value will be 53, the ASCII value representing the digit 5), or by value (e.g. they would have to enter53to produce the digit 5)?