Programming in Any Language
The Visual Studio 2022 IDE
Click to enlarge
Welcome to the Visual Studio 2022 Integrated Development Environment (IDE). Learning C# gets you right into creating programs with a graphical user interface (GUI) look to them. Comes right with the package. What I like about C# over the other two is that you can start out with the GUI interface as you learn programming. Programming with a GUI right from the start is a lot more rewarding for the new programmer. You are building programs that look like the ones we use today. That alone keeps the motivation going.
The Text Box and String Variables
Up to now we have been doing straight line programming. One line of code follows another. And then it’s done. That pretty much limits what we can do. So, it only makes sense that we expand on that. We’ll continue to use variables, controls, and the GUI. And we’ll add to our knowledge in this area as we continue our journey. But now we get a chance to expand what our programs can do.
Click to enlarge
The first thing we’ll look at is the Decision Structure. The tools in the decision structure allow our programs to branch off in other directions.
How String Variables are Stored
When we work with strings it is important to understand what they are and how the computer sees them. In order to do that we have to understand how the computer communicates with us. Since we can’t talk to the computer in English, or any other language for that matter, we need another form of communications. ASCII stands for American Standard Code for Information Interchange. Computers can only understand numbers, so an ASCII code is the numerical representation of a character such as 'a' or '@' or an action of some sort. PDF: Demo
Variable Scope
When you create a variable in memory, depending on where it is initialized, the variable may be invisible to certain routines. If it’s invisible, then a routine without permission can’t use it. Where we declare a variable determines how it can be seen. That’s Scope.
How Numeric Variables are Stored
Click to enlarge
Numeric variables are reserved for data used in calculations. Plain and simple. When those numeric variables are to be displayed on a screen or a printer they must be converted to strings. Numeric variables come in a variety of sizes and flavors. This makes it a little harder for the new programmer at first but in the long run it makes sense. PDF: Demo