
- #VB NET 2010 CONSOLE APPLICATION CHECK INPUT IS LIKE STRING HOW TO#
- #VB NET 2010 CONSOLE APPLICATION CHECK INPUT IS LIKE STRING CODE#
- #VB NET 2010 CONSOLE APPLICATION CHECK INPUT IS LIKE STRING SERIES#
There are many built-in methods available to you, so you can format strings in a number of ways. In this example, the first parameter (myNumber) would appear as £158 and the second one would appear as 25%. StrFormat = String.Format("", myNumber, mySecondNumber) Net Framework becomes useful, as it can detect the user’s country / regional settings and format the piece of text to match those settings. For example, say you wrote Console.WriteLine (“Your balance is £5″) however, if you gave this away to someone in the USA or Italy, they would see the British pound symbol instead of their own country’s currency symbol. The string.format method is useful for formatting your text, and you can format it in many ways. This will print out “thecodingguys is awesome”. For example: Console.WriteLine(myName & " is awesome") You use the & ( or + ) to form a concatenation. It can be very useful when you want to link something together to form a sentence.
#VB NET 2010 CONSOLE APPLICATION CHECK INPUT IS LIKE STRING HOW TO#
#VB NET 2010 CONSOLE APPLICATION CHECK INPUT IS LIKE STRING CODE#
I should have placed much of this code in a Button_Click. After reading this I realized that I was doing too much in the Form_Load that wasn't really relevent to that place in the code.

The subject started because I had sent my app into a sub routine off the Form_Load and it didn't do what I expected. I have no reason to use a WinForm since my app doesn't require any human intervention.

Guys, in my frustration over this and after reading all the responses I figured out that my application was flawed in the beginning.

#VB NET 2010 CONSOLE APPLICATION CHECK INPUT IS LIKE STRING SERIES#
In a related question and perhaps more important as a point of discussion, if I'm doing a series of repetitive tests before I move to my main logic Sub Routines, is the Sub Form_Load the place to do it or is it 'best practise' to do these in other Subs from the Form_Load? What puzzles me (yet may provide some clue) is that I have other If IO.Directory.Exists() and If File.Exists(Filename) statement in the Form_Load that do Me.Close properly. But somehow while it does report False on the If File.Exists(Filename) and it does write to my log correctly, it slips past the next statement whether it is a Me.Close() or Application.Exit() and returns to the Sub Form_Load. In the event that 1 of these files does not exist, I want it to Exit program. My app checks for the existance of various files in a Sub Routine off the Form_Load and writes to a log along the way. Can you Close or Exit an application from within a Sub or what would be the 'best practise' for Exiting when the app has failed a logic test?
