Validation to ensure value entered is a integerValidate decimal numbers in JavaScript - IsNumeric()How to validate an email address in JavaScriptA potentially dangerous Request.Form value was detected from the clientA comprehensive regex for phone number validation(Built-in) way in JavaScript to check if a string is a valid numberHow to validate an email address using a regular expression?What is the maximum length of a valid email address?Conversion from string “” to type 'Integer' is not valid on a for each statementObject enter event “string to decimal not valid”Re-prompt user if entered value is negative for multiple inputs
Etymology of "Talo" (Finnish for "house"). Can it be a cognate of Thalamus?
Unlock your Lock
Can I take a boxed bicycle on a German train?
Counting the triangles that can be formed from segments of given lengths
How to prevent a hosting company from accessing a VM's encryption keys?
Why not explainability is a metric for publishability?
Grep contents before a colon
Is this password scheme legit?
Will removing shelving screws from studs damage the studs?
Force SQL Server to use fragmented indexes?
Why is there not a willingness from the world to step in between Pakistan and India?
Availability Groups automatic failover is not so automatic
Is a memoized pure function itself considered pure?
If I said I had $100 when asked, but I actually had $200, would I be lying by omission?
Alternatives to Network Backup
Do sharpies or markers damage soft rock climbing gear?
What happens to transactions included in extinct or invalid blocks?
Was a star-crossed lover
Does NASA use any type of office/groupware software and which is that?
How many petaflops does it take to land on the moon? What does Artemis need with an Aitken?
Are (c#) dictionaries an Anti Pattern?
Recommended Breathing Exercises to Play Woodwinds
how to write a complete text using calligraphic fonts?
Pen test results for web application include a file from a forbidden directory that is not even used or referenced
Validation to ensure value entered is a integer
Validate decimal numbers in JavaScript - IsNumeric()How to validate an email address in JavaScriptA potentially dangerous Request.Form value was detected from the clientA comprehensive regex for phone number validation(Built-in) way in JavaScript to check if a string is a valid numberHow to validate an email address using a regular expression?What is the maximum length of a valid email address?Conversion from string “” to type 'Integer' is not valid on a for each statementObject enter event “string to decimal not valid”Re-prompt user if entered value is negative for multiple inputs
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I want a validation method that ensures that value entered is valid, it must be a integer (can include negative) and must not be blank. I have written this code, however not correct, can someone help me please. Thank you
If (b <> Integer Or " ") Then
Console.WriteLine("Value entered must be a number")
End If
new code:
Line98:
Console.WriteLine("Please input the value of, B:")
b = Console.ReadLine()
If Not Integer.TryParse(b, New Integer) Then
Console.WriteLine("Value entered must be a number")
GoTo Line98
End If
so i used a select statement, and if a user enters "abckak" any non numerical data i get an error Unhandled Exception: System.InvalidCastException: Conversion from string "gakjdg" to type 'Integer' is not valid.
how could this be fixed, this is a quick example of my code
Console.WriteLine("..........Main Menu..........")
Console.WriteLine("Please input 1 ")
Console.WriteLine("Please input 2")
Console.WriteLine("Please input 3 ")
Console.WriteLine("Please input 4 ")
Console.WriteLine("Please input 5 for Help")
Console.WriteLine("Please input 6 to Exit")
Console.WriteLine("Please enter your choice: ")
Choice = Console.ReadLine()
Select Case Choice
case1; etc
Case Else
Console.WriteLine("Error: " & Choice & " is not a option, Please try again")
vb.net validation
add a comment |
I want a validation method that ensures that value entered is valid, it must be a integer (can include negative) and must not be blank. I have written this code, however not correct, can someone help me please. Thank you
If (b <> Integer Or " ") Then
Console.WriteLine("Value entered must be a number")
End If
new code:
Line98:
Console.WriteLine("Please input the value of, B:")
b = Console.ReadLine()
If Not Integer.TryParse(b, New Integer) Then
Console.WriteLine("Value entered must be a number")
GoTo Line98
End If
so i used a select statement, and if a user enters "abckak" any non numerical data i get an error Unhandled Exception: System.InvalidCastException: Conversion from string "gakjdg" to type 'Integer' is not valid.
how could this be fixed, this is a quick example of my code
Console.WriteLine("..........Main Menu..........")
Console.WriteLine("Please input 1 ")
Console.WriteLine("Please input 2")
Console.WriteLine("Please input 3 ")
Console.WriteLine("Please input 4 ")
Console.WriteLine("Please input 5 for Help")
Console.WriteLine("Please input 6 to Exit")
Console.WriteLine("Please enter your choice: ")
Choice = Console.ReadLine()
Select Case Choice
case1; etc
Case Else
Console.WriteLine("Error: " & Choice & " is not a option, Please try again")
vb.net validation
1
If Not Integer.TryParse(b, New Integer) Then
.... This is a quick solution and would suit what you are looking for. Please see more there about theTryParse
...
– Çöđěxěŕ
Mar 27 at 20:40
@Çöđěxěŕ, i tried that however, and i input f lets just say, i get error Unhandled Exception: System.InvalidCastException: Conversion from string "f" to type 'Integer' is not valid
– loco3424
Mar 27 at 20:56
add a comment |
I want a validation method that ensures that value entered is valid, it must be a integer (can include negative) and must not be blank. I have written this code, however not correct, can someone help me please. Thank you
If (b <> Integer Or " ") Then
Console.WriteLine("Value entered must be a number")
End If
new code:
Line98:
Console.WriteLine("Please input the value of, B:")
b = Console.ReadLine()
If Not Integer.TryParse(b, New Integer) Then
Console.WriteLine("Value entered must be a number")
GoTo Line98
End If
so i used a select statement, and if a user enters "abckak" any non numerical data i get an error Unhandled Exception: System.InvalidCastException: Conversion from string "gakjdg" to type 'Integer' is not valid.
how could this be fixed, this is a quick example of my code
Console.WriteLine("..........Main Menu..........")
Console.WriteLine("Please input 1 ")
Console.WriteLine("Please input 2")
Console.WriteLine("Please input 3 ")
Console.WriteLine("Please input 4 ")
Console.WriteLine("Please input 5 for Help")
Console.WriteLine("Please input 6 to Exit")
Console.WriteLine("Please enter your choice: ")
Choice = Console.ReadLine()
Select Case Choice
case1; etc
Case Else
Console.WriteLine("Error: " & Choice & " is not a option, Please try again")
vb.net validation
I want a validation method that ensures that value entered is valid, it must be a integer (can include negative) and must not be blank. I have written this code, however not correct, can someone help me please. Thank you
If (b <> Integer Or " ") Then
Console.WriteLine("Value entered must be a number")
End If
new code:
Line98:
Console.WriteLine("Please input the value of, B:")
b = Console.ReadLine()
If Not Integer.TryParse(b, New Integer) Then
Console.WriteLine("Value entered must be a number")
GoTo Line98
End If
so i used a select statement, and if a user enters "abckak" any non numerical data i get an error Unhandled Exception: System.InvalidCastException: Conversion from string "gakjdg" to type 'Integer' is not valid.
how could this be fixed, this is a quick example of my code
Console.WriteLine("..........Main Menu..........")
Console.WriteLine("Please input 1 ")
Console.WriteLine("Please input 2")
Console.WriteLine("Please input 3 ")
Console.WriteLine("Please input 4 ")
Console.WriteLine("Please input 5 for Help")
Console.WriteLine("Please input 6 to Exit")
Console.WriteLine("Please enter your choice: ")
Choice = Console.ReadLine()
Select Case Choice
case1; etc
Case Else
Console.WriteLine("Error: " & Choice & " is not a option, Please try again")
vb.net validation
vb.net validation
edited Mar 27 at 21:46
loco3424
asked Mar 27 at 20:22
loco3424loco3424
104 bronze badges
104 bronze badges
1
If Not Integer.TryParse(b, New Integer) Then
.... This is a quick solution and would suit what you are looking for. Please see more there about theTryParse
...
– Çöđěxěŕ
Mar 27 at 20:40
@Çöđěxěŕ, i tried that however, and i input f lets just say, i get error Unhandled Exception: System.InvalidCastException: Conversion from string "f" to type 'Integer' is not valid
– loco3424
Mar 27 at 20:56
add a comment |
1
If Not Integer.TryParse(b, New Integer) Then
.... This is a quick solution and would suit what you are looking for. Please see more there about theTryParse
...
– Çöđěxěŕ
Mar 27 at 20:40
@Çöđěxěŕ, i tried that however, and i input f lets just say, i get error Unhandled Exception: System.InvalidCastException: Conversion from string "f" to type 'Integer' is not valid
– loco3424
Mar 27 at 20:56
1
1
If Not Integer.TryParse(b, New Integer) Then
.... This is a quick solution and would suit what you are looking for. Please see more there about the TryParse
...– Çöđěxěŕ
Mar 27 at 20:40
If Not Integer.TryParse(b, New Integer) Then
.... This is a quick solution and would suit what you are looking for. Please see more there about the TryParse
...– Çöđěxěŕ
Mar 27 at 20:40
@Çöđěxěŕ, i tried that however, and i input f lets just say, i get error Unhandled Exception: System.InvalidCastException: Conversion from string "f" to type 'Integer' is not valid
– loco3424
Mar 27 at 20:56
@Çöđěxěŕ, i tried that however, and i input f lets just say, i get error Unhandled Exception: System.InvalidCastException: Conversion from string "f" to type 'Integer' is not valid
– loco3424
Mar 27 at 20:56
add a comment |
1 Answer
1
active
oldest
votes
Look into Integer.TryParse, it will try and parse the string into a integer if it can, if it can't it wont throw an exception...
Dim b As Integer
Console.WriteLine("Please input the value of, B:")
If Not Integer.TryParse(Console.ReadLine(), b) Then
Console.WriteLine("Value entered must be a number")
GoTo Line98
End If
If it can parse the input from the user, then b
would be the value from the parse, otherwise the value of b
is still 0...
Edit Per Comment
Dim b As Integer
Do Until b > 0
Console.WriteLine("Please input the value of, B:")
If Not Integer.TryParse(Console.ReadLine(), b) OrElse b <= 0 Then
Console.WriteLine("Value entered must be a number and not equal 0")
GoTo Line98
End If
Loop
@codexer one more question bro, If (a = 0) Then Console.WriteLine("Error, number can not be 0, Please Try Again!") GoTo line93 'This will ask for input A again, and repeat the process until a is not 0 End If If Not Integer.TryParse(Console.ReadLine(), a) Then Console.WriteLine(vbLf & "Error: Value entered must be a number") GoTo line93 End If, how would i combine these two
– loco3424
Mar 27 at 21:06
@loco3424 with that statement than a/b can be less than 0. In your post you said numbers could be negative... Also if you have further questions please ask another one seperate from the original. Also if this has helped, please vote and accept if this solved your issue so others know this worked.
– Çöđěxěŕ
Mar 27 at 21:16
@codexer, yes sorry a can not be a negative, however problem with your code if i input a valid number it tells me Value entered must be a number and greater than 0 then continues, please help
– loco3424
Mar 27 at 21:18
I am confused, it seems you keep changing what you are asking. The current code will make sure a user enters a valid number and also make sure that number is greater than 0, if not it loops again...
– Çöđěxěŕ
Mar 27 at 21:22
@codexer, yes however before continuing it tells me Value entered must be a number and greater than 0 then continues despite me entering 9
– loco3424
Mar 27 at 21:23
|
show 6 more comments
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55385820%2fvalidation-to-ensure-value-entered-is-a-integer%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Look into Integer.TryParse, it will try and parse the string into a integer if it can, if it can't it wont throw an exception...
Dim b As Integer
Console.WriteLine("Please input the value of, B:")
If Not Integer.TryParse(Console.ReadLine(), b) Then
Console.WriteLine("Value entered must be a number")
GoTo Line98
End If
If it can parse the input from the user, then b
would be the value from the parse, otherwise the value of b
is still 0...
Edit Per Comment
Dim b As Integer
Do Until b > 0
Console.WriteLine("Please input the value of, B:")
If Not Integer.TryParse(Console.ReadLine(), b) OrElse b <= 0 Then
Console.WriteLine("Value entered must be a number and not equal 0")
GoTo Line98
End If
Loop
@codexer one more question bro, If (a = 0) Then Console.WriteLine("Error, number can not be 0, Please Try Again!") GoTo line93 'This will ask for input A again, and repeat the process until a is not 0 End If If Not Integer.TryParse(Console.ReadLine(), a) Then Console.WriteLine(vbLf & "Error: Value entered must be a number") GoTo line93 End If, how would i combine these two
– loco3424
Mar 27 at 21:06
@loco3424 with that statement than a/b can be less than 0. In your post you said numbers could be negative... Also if you have further questions please ask another one seperate from the original. Also if this has helped, please vote and accept if this solved your issue so others know this worked.
– Çöđěxěŕ
Mar 27 at 21:16
@codexer, yes sorry a can not be a negative, however problem with your code if i input a valid number it tells me Value entered must be a number and greater than 0 then continues, please help
– loco3424
Mar 27 at 21:18
I am confused, it seems you keep changing what you are asking. The current code will make sure a user enters a valid number and also make sure that number is greater than 0, if not it loops again...
– Çöđěxěŕ
Mar 27 at 21:22
@codexer, yes however before continuing it tells me Value entered must be a number and greater than 0 then continues despite me entering 9
– loco3424
Mar 27 at 21:23
|
show 6 more comments
Look into Integer.TryParse, it will try and parse the string into a integer if it can, if it can't it wont throw an exception...
Dim b As Integer
Console.WriteLine("Please input the value of, B:")
If Not Integer.TryParse(Console.ReadLine(), b) Then
Console.WriteLine("Value entered must be a number")
GoTo Line98
End If
If it can parse the input from the user, then b
would be the value from the parse, otherwise the value of b
is still 0...
Edit Per Comment
Dim b As Integer
Do Until b > 0
Console.WriteLine("Please input the value of, B:")
If Not Integer.TryParse(Console.ReadLine(), b) OrElse b <= 0 Then
Console.WriteLine("Value entered must be a number and not equal 0")
GoTo Line98
End If
Loop
@codexer one more question bro, If (a = 0) Then Console.WriteLine("Error, number can not be 0, Please Try Again!") GoTo line93 'This will ask for input A again, and repeat the process until a is not 0 End If If Not Integer.TryParse(Console.ReadLine(), a) Then Console.WriteLine(vbLf & "Error: Value entered must be a number") GoTo line93 End If, how would i combine these two
– loco3424
Mar 27 at 21:06
@loco3424 with that statement than a/b can be less than 0. In your post you said numbers could be negative... Also if you have further questions please ask another one seperate from the original. Also if this has helped, please vote and accept if this solved your issue so others know this worked.
– Çöđěxěŕ
Mar 27 at 21:16
@codexer, yes sorry a can not be a negative, however problem with your code if i input a valid number it tells me Value entered must be a number and greater than 0 then continues, please help
– loco3424
Mar 27 at 21:18
I am confused, it seems you keep changing what you are asking. The current code will make sure a user enters a valid number and also make sure that number is greater than 0, if not it loops again...
– Çöđěxěŕ
Mar 27 at 21:22
@codexer, yes however before continuing it tells me Value entered must be a number and greater than 0 then continues despite me entering 9
– loco3424
Mar 27 at 21:23
|
show 6 more comments
Look into Integer.TryParse, it will try and parse the string into a integer if it can, if it can't it wont throw an exception...
Dim b As Integer
Console.WriteLine("Please input the value of, B:")
If Not Integer.TryParse(Console.ReadLine(), b) Then
Console.WriteLine("Value entered must be a number")
GoTo Line98
End If
If it can parse the input from the user, then b
would be the value from the parse, otherwise the value of b
is still 0...
Edit Per Comment
Dim b As Integer
Do Until b > 0
Console.WriteLine("Please input the value of, B:")
If Not Integer.TryParse(Console.ReadLine(), b) OrElse b <= 0 Then
Console.WriteLine("Value entered must be a number and not equal 0")
GoTo Line98
End If
Loop
Look into Integer.TryParse, it will try and parse the string into a integer if it can, if it can't it wont throw an exception...
Dim b As Integer
Console.WriteLine("Please input the value of, B:")
If Not Integer.TryParse(Console.ReadLine(), b) Then
Console.WriteLine("Value entered must be a number")
GoTo Line98
End If
If it can parse the input from the user, then b
would be the value from the parse, otherwise the value of b
is still 0...
Edit Per Comment
Dim b As Integer
Do Until b > 0
Console.WriteLine("Please input the value of, B:")
If Not Integer.TryParse(Console.ReadLine(), b) OrElse b <= 0 Then
Console.WriteLine("Value entered must be a number and not equal 0")
GoTo Line98
End If
Loop
edited Mar 27 at 21:20
answered Mar 27 at 20:58
ÇöđěxěŕÇöđěxěŕ
5,4315 gold badges21 silver badges44 bronze badges
5,4315 gold badges21 silver badges44 bronze badges
@codexer one more question bro, If (a = 0) Then Console.WriteLine("Error, number can not be 0, Please Try Again!") GoTo line93 'This will ask for input A again, and repeat the process until a is not 0 End If If Not Integer.TryParse(Console.ReadLine(), a) Then Console.WriteLine(vbLf & "Error: Value entered must be a number") GoTo line93 End If, how would i combine these two
– loco3424
Mar 27 at 21:06
@loco3424 with that statement than a/b can be less than 0. In your post you said numbers could be negative... Also if you have further questions please ask another one seperate from the original. Also if this has helped, please vote and accept if this solved your issue so others know this worked.
– Çöđěxěŕ
Mar 27 at 21:16
@codexer, yes sorry a can not be a negative, however problem with your code if i input a valid number it tells me Value entered must be a number and greater than 0 then continues, please help
– loco3424
Mar 27 at 21:18
I am confused, it seems you keep changing what you are asking. The current code will make sure a user enters a valid number and also make sure that number is greater than 0, if not it loops again...
– Çöđěxěŕ
Mar 27 at 21:22
@codexer, yes however before continuing it tells me Value entered must be a number and greater than 0 then continues despite me entering 9
– loco3424
Mar 27 at 21:23
|
show 6 more comments
@codexer one more question bro, If (a = 0) Then Console.WriteLine("Error, number can not be 0, Please Try Again!") GoTo line93 'This will ask for input A again, and repeat the process until a is not 0 End If If Not Integer.TryParse(Console.ReadLine(), a) Then Console.WriteLine(vbLf & "Error: Value entered must be a number") GoTo line93 End If, how would i combine these two
– loco3424
Mar 27 at 21:06
@loco3424 with that statement than a/b can be less than 0. In your post you said numbers could be negative... Also if you have further questions please ask another one seperate from the original. Also if this has helped, please vote and accept if this solved your issue so others know this worked.
– Çöđěxěŕ
Mar 27 at 21:16
@codexer, yes sorry a can not be a negative, however problem with your code if i input a valid number it tells me Value entered must be a number and greater than 0 then continues, please help
– loco3424
Mar 27 at 21:18
I am confused, it seems you keep changing what you are asking. The current code will make sure a user enters a valid number and also make sure that number is greater than 0, if not it loops again...
– Çöđěxěŕ
Mar 27 at 21:22
@codexer, yes however before continuing it tells me Value entered must be a number and greater than 0 then continues despite me entering 9
– loco3424
Mar 27 at 21:23
@codexer one more question bro, If (a = 0) Then Console.WriteLine("Error, number can not be 0, Please Try Again!") GoTo line93 'This will ask for input A again, and repeat the process until a is not 0 End If If Not Integer.TryParse(Console.ReadLine(), a) Then Console.WriteLine(vbLf & "Error: Value entered must be a number") GoTo line93 End If, how would i combine these two
– loco3424
Mar 27 at 21:06
@codexer one more question bro, If (a = 0) Then Console.WriteLine("Error, number can not be 0, Please Try Again!") GoTo line93 'This will ask for input A again, and repeat the process until a is not 0 End If If Not Integer.TryParse(Console.ReadLine(), a) Then Console.WriteLine(vbLf & "Error: Value entered must be a number") GoTo line93 End If, how would i combine these two
– loco3424
Mar 27 at 21:06
@loco3424 with that statement than a/b can be less than 0. In your post you said numbers could be negative... Also if you have further questions please ask another one seperate from the original. Also if this has helped, please vote and accept if this solved your issue so others know this worked.
– Çöđěxěŕ
Mar 27 at 21:16
@loco3424 with that statement than a/b can be less than 0. In your post you said numbers could be negative... Also if you have further questions please ask another one seperate from the original. Also if this has helped, please vote and accept if this solved your issue so others know this worked.
– Çöđěxěŕ
Mar 27 at 21:16
@codexer, yes sorry a can not be a negative, however problem with your code if i input a valid number it tells me Value entered must be a number and greater than 0 then continues, please help
– loco3424
Mar 27 at 21:18
@codexer, yes sorry a can not be a negative, however problem with your code if i input a valid number it tells me Value entered must be a number and greater than 0 then continues, please help
– loco3424
Mar 27 at 21:18
I am confused, it seems you keep changing what you are asking. The current code will make sure a user enters a valid number and also make sure that number is greater than 0, if not it loops again...
– Çöđěxěŕ
Mar 27 at 21:22
I am confused, it seems you keep changing what you are asking. The current code will make sure a user enters a valid number and also make sure that number is greater than 0, if not it loops again...
– Çöđěxěŕ
Mar 27 at 21:22
@codexer, yes however before continuing it tells me Value entered must be a number and greater than 0 then continues despite me entering 9
– loco3424
Mar 27 at 21:23
@codexer, yes however before continuing it tells me Value entered must be a number and greater than 0 then continues despite me entering 9
– loco3424
Mar 27 at 21:23
|
show 6 more comments
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55385820%2fvalidation-to-ensure-value-entered-is-a-integer%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
If Not Integer.TryParse(b, New Integer) Then
.... This is a quick solution and would suit what you are looking for. Please see more there about theTryParse
...– Çöđěxěŕ
Mar 27 at 20:40
@Çöđěxěŕ, i tried that however, and i input f lets just say, i get error Unhandled Exception: System.InvalidCastException: Conversion from string "f" to type 'Integer' is not valid
– loco3424
Mar 27 at 20:56