Friday, May 20, 2022 20:13

Archive for 2016

Float variable type

Tuesday, December 27th, 2016

C# language uses float variable type to store real number values in floating point (negative and positive numbers that contain a fractional part). The C# compiler will allocate 32 bits (4 bytes) to store values of type float. A float variable type can store values with a precision of six or seven decimals in the interval of 3.4E-38 and 3.4E+38.… Read more

Char variable type

Monday, December 26th, 2016

C# language uses char variable type to store values of type character. The C# compiler allocates 16 bits (2 bytes) to store a char variable, which is similar to the ushort type. The char variable type can store integer value types ranging from 0 to 65535.… Read more

Int variable type

Monday, December 26th, 2016

A variable is a name that the compiler assigns to one or more memory location(s). When you declare a variable in a program, you have to specify its type and name. The type of a variable specifies the kind of values that the variable can store and the set of operations that the program can execute on variables.… Read more

Why do we use hexadecimal numbers?

Monday, December 26th, 2016

In some cases, you will see programmers that represent decimal or binary values using hexadecimal values. Why is that?

Well, since we now know from previous lessons how to count in both binary and hexadecimal, let’s see how a few of these numbers correspond:

If you look closely to the above relationship, you will quickly notice that the maximum value a hexadecimal digit can store is equal to exactly the maximum number 4 bits can store.… Read more

Hexadecimal numbers

Monday, December 26th, 2016

Just like the binary representation, of which I have discussed in the previous lesson, hexadecimal notation is just another form of representing numbers. So, hexadecimal numbers, at their core, are normal numbers, represented in base 16, instead of base 10, as for the decimal numbers.… Read more

Bit. Byte. Binary counting.

Monday, December 26th, 2016

I was explaining in a previous lesson that at the deepest level, computers store and process information only as two values, 0 and 1. These values are the smallest individual pieces of information inside a computer, and they are called bits.… Read more

Interacting with the Console

Monday, December 26th, 2016

This lesson will be based on things that we have not yet learned about, so it is not mandatory to fully comprehend it. However, at least a very basic understanding of the interaction with the Console is required, in order to continue explaining concepts in the following lessons.… Read more

Choosing significant variable names

Monday, December 26th, 2016

First of all, this is not a mandatory topic. You can name your variables whatever you like. However, you will soon come to understand that choosing significant variable names is a very good programming practice.

If you ask me, the term “generally accepted programming naming convention” is practically a joke.… Read more

C# keywords

Monday, December 26th, 2016

C# programming language defines a few keywords that have a special meaning for the compiler. When you chose your variables, classes, methods names, you must be careful to avoid using these C# keywords, or you will get compiler errors, and your program will not compile.… Read more

Declaring and initializing variables

Monday, December 26th, 2016

The next topic in our lessons will be declaring and initializing variables. What do those terms mean?

As we already said in a previous lesson, declaring a variable means creating a new variable, by telling the compiler its type and its name.… Read more


Follow the white rabbit