1/87
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Method
A block of code which only runs when it is called.
Code Reusability
Define the code once, and can be used many times.
Access Modifiers
Keywords that are used in order to specify the accessibility of the methods.
Class Visibility: Public
Public members can be directly called once the object is created.
Class Visibility: Private
Private members called within a method and it is not visible when object is created.
Method Overloading
C# allows multiple methods to have the same name but with different signatures.
Static Methods
Can be called without creating an object of the class.
Optional Parameters
C# allows specifying default values for parameters, which makes them optional when calling the method.
Math Function: Round()
Rounds a number to the nearest integer or specified number of decimal places.
Math Function: Sqrt()
Returns the square root of a number.
Math Function: Pow()
Returns the value of x to the power of y.
Math Function: Abs()
Returns the absolute value of a number.
Length (String)
Gets the number of characters in a string.
String Manipulation: ToUpper() / ToLower()
Converts a string to upper or lower case format.
String Manipulation: Contains()
Checks if a string contains a specific substring.
String Manipulation: Replace()
Replaces all occurrences of a substring with another string.
String Manipulation: Substring()
Retrieves a portion of the string.
Array Functions: Length (Array)
Returns the number of elements in the array.
Array Functions: Sort()
Sorts the elements of an array in ascending order.
Array Functions: IndexOf()
Returns the index of the first occurrence of an element.
Type Convertion: ToInt32()
A static method provided by C# to convert a string to a 32-bit signed integer
Type Convertion: ToDouble()
Converts the value of the specified object to an double-precision floating-point number, using the specified culture-specific formatting information.
Type Convertion: ToString()
Returns a string that represents the object instance. Used to construct a string containing the information on an object that can be printed.
Type Convertion: Parse()
Converting a value from one data type (usually a string) to another type (like int , float , double , etc...)
This is common when working with user input, as data from Console.
Control Structures
A way to specify flow of control in any algorithm or program can be more clear and understood, it analyzes and chooses in which direction a program flows based on certain parameters or conditions
Sequential Logic
It follows a serial or a sequence flow.
Selection Logic
Allows one set of statements to be executed if a condition is true and another set of actions to be executed if a condition is false.
Iteration Logic
Employs a loop which involves a 'REPEAT Statement'.
For Loop (Iteration)
A for loop repeats a block of code a specific number of times or iterates over a collection of items (like lists or arrays).
While Loop
Repeats a block of code as long as a given condition is true. It is typically used when the number of iterations is not known in advance.
Encapsulation
The concept of bundling the data and methods that operate on the data within one unit.
Inheritance
The mechanism by which one class can inherit properties and methods from another class.
Polymorphism
The ability of an object to take on many forms.
Abstraction
The concept of hiding the complex reality while exposing only the necessary parts.
Object-Oriented Programming (OOP)
Programming paradigm based on objects and classes.
Classes
Containers for data attributes and methods.
Objects
Instances of classes containing specific data.
Constructors
Special methods invoked when class objects are created.
Type Casting
Assigning a value from one data type to another.
Implicit Casting
Automatically converting smaller types to larger types.
Explicit Casting
Manually converting larger types to smaller types.
Data Types
Classifications of data that determine storage size.
Operators
Symbols that perform operations on variables.
C#
Programming language used for Windows applications.
Comments
Annotations in code for clarity and explanation.
Exception Handling
Mechanism to handle runtime errors gracefully.
Try-Catch Method
Used to catch and handle exceptions in code.
Windows Forms
Framework for building Windows desktop applications.
Event-Driven Programming
Programming paradigm based on events and actions.
String
Variable containing a collection of characters.
Value Type
Data types holding values in their own memory.
Reference Type
Data types holding references to memory locations.
Overflowing
Condition when a calculation exceeds data type limits.
Identifiers
Names used to identify variables and functions.
Naming Convention
Rules for naming identifiers in programming.
Naming a Constructor
Constructors have the same name as the Class.
Implementing a Default Constructor
When you create a default constructor, you can SET an initial value of the class itself.
Copy Constructors
Constructors that copy itself.
Private Constructors
Preventing to implement this specific constructor, while implementing Encapsulation.
Static Constructor
You can only invoke this static Constructor...ONCE.
String Length
Find the length of the string 'Swim' Total char = 4.
Concatenating Strings
You can concatenate strings using the + operator.
String Interpolation
Using the '$' symbol before a string, allowing us to embed expression directly in a string.
String Methods
These methods help you manipulate and analyze string data.
String Comparison
Compare strings using methods like Equals, Compare, and CompareOrdinal for various types of string.
String Formatting
Using methods like 'string.Format' or interpolated strings for more complex formatting tasks.
Null vs. Empty Strings
Null string reference means the variable does not point to any string object, while an empty string is a valid string with no characters.
Variable
A name given to a storage location in memory. A data item whose value can change during the program's execution.
Constant
An immutable value. A data item whose value cannot change during a program execution.
Assignment Operator
Used to ASSIGN values to variables and to UPDATE the value of a variable.
Arithmetic Operator
Used to perform basic MATHEMATICAL OPERATIONS on numeric values.
Relational Operators
Used to COMPARE two values or expressions and return a boolean result.
Logical Operators
Used to PERFORM logical operations on Boolean values or expressions.
Expression
In C#: combination of operands (variables, literals, method calls) and operators that can be evaluated to a single value.
Camel Case
A naming convention where the first letter of the first word is lowercase and the first letter of each subsequent word is uppercase.
Pascal Case
A naming convention where the first letter of each word is capitalized.
Hungarian Notation
A naming convention that prefixes variable names with a type indicator.
Value Assignment
Can be assigned new values.
Scope
Determines where in the code variables can be accessed.
Lifetime
Duration during which a variable exists in memory.
Mutability
Whether a variable can be changed (mutable) or not (immutable).
Optional Parameters
C# allows specifying default values for parameters which make them optional when calling the method
Void
A return type that means this method doesn't have a return value
Spaghetti Codes
Program Jumps over the place and its difficult to follow
OOP Paradigm
Suggest that we should model Instructions in a Computer program with the data they manipulate and store these as components together
Procedural Programming
Sequence of Instructions to be executed.
Reference Datatype
Data types that contains a pointer to another memory
Initialization
giving a variable an initial value