Parameters
Parameters are divided into formal parameters and actual parameters Formal Parameters The formal parameter, full name Formal Parameter, is also commonly known as a parameter or formal argument. A formal …
Independent Software Developer Studio
Learn Microsoft’s C# programming language. Master syntax, object-oriented design and .NET development. Build desktop, mobile, web and game applications with hands-on examples.
Parameters are divided into formal parameters and actual parameters Formal Parameters The formal parameter, full name Formal Parameter, is also commonly known as a parameter or formal argument. A formal …
These are known as Local Functions in English, introduced starting with C# 7.0. We previously covered method invocation. Inside a method body, you may call other methods following these rules: …
We briefly touched on this in the last lesson: you can actually write return even inside methods with a void return type. Methods with a return value require a return …
A method can return data to the calling code, and the return value will replace the calling expression directly. If your method needs to return data, you have to declare …
You can call other methods from within a method. Methods are able to call other methods, and those methods can call even more methods. You can invoke multiple methods inside …
The English term for program control flow is: Flow of Control When we build a program, most of our logic lives inside methods. The rest can be found within properties, …
Local Constants Local constants work much like local variables, with one key difference: once initialized, their value cannot be modified. Just like local variables, constants must be declared inside a …
We touched on this topic in earlier lessons, but we’ll reinforce your understanding by examining memory storage in this section. This tutorial is from foxdevelop.com. Please cite the source when …
Type Inference and the var Keyword Take a look at the code below. The data type specified at the start of each variable declaration can be automatically determined by the …
A method is a named block of code. You can run this block by calling its name elsewhere in your program, pass data into the method, and receive output values …
Access modifiers only restrict code outside the class. There is no access isolation within the class. As we have learned earlier, all members can be freely accessed from inside a …
Inside a class, any member function can directly access all other members of the same class by name. Access modifiers are optional prefixes used in member declarations. They control whether …
A class declaration acts like a template or blueprint. You can create any number of class instances from it. Instance Members: Every instance of a class is a separate entity …
Procedural Programming vs Object-Oriented Programming Before the emergence of classes, languages such as C had no concept of classes. Programming languages without classes and objects like C are known as …
Classification of Value Types and Reference Types Predefined Built-in Types Category Included Types Value Types (Primitive Numeric / Boolean / Char) Signed integers: sbyte, short, int, longUnsigned integers: byte, ushort, …
The data item type determines two key aspects: the memory footprint (number of bits) required to store it, and the data members contained within the type. Additionally, the type dictates …
When a program runs, data must be loaded into memory. The space data occupies and its storage location are determined by its data type. Two memory regions are used to …
Custom Types Besides the 16 predefined built-in types native to C#, developers can create their own custom user types, split into six categories total: Custom types are created through type …
C# comes with 16 built-in predefined types, split into 13 simple types and 3 non-simple types. All names for predefined types are written entirely in lowercase. 13 Simple Types Key …
Class members fall into two categories: data members and function members Simple types like int, long and short we’ve covered earlier are built straight into .NET. Microsoft’s developers coded these …