C# Fundamentals and .NET Framework: Notes on .NET Built-in Types
.NET Built-in Types
Primitive Types and Non-Compatible Types
Primitive types: int, float, char, etc.
Non-compatible types: user-defined types, objects, etc.
Implicit and Explicit Type Conversion
Implicit type conversion: automatic type conversion, e.g. int to long
Explicit type conversion: manual type conversion, e.g. int to float
Types and Type Conversion
Types: value types, reference types, etc.
Type conversion: converting one type to another
Variable Scopes and Overflows
Variable scopes: where a variable is accessible, e.g. local vs global variables
Overflows: when a variable value exceeds its capacity, causing data loss
Operators in C#
Arithmetic operators: +, -, *, /, %
Comparison operators: <, >, ==, !=, <=, >=
Logical operators: &&, ||, !
Bitwise operators: &, |, ^, ~, <<, >>
Ternary operator: "condition ? expr1 : expr2"
Null coalescing operator: "expr1 ?? expr2"
Type Conversion and Casting
Convert class: converts between different data types
Parse method: converts a string to a numeric type
Primitive Data Types: Introduction
Introduction to primitive data types
Data Loss and Safe Conversion
Safe type conversion: avoiding data loss during type conversion
Using Convert Class and Parse Method
Using the Convert class and Parse method for type conversion
Note: Other topics not mentioned in these notes include CLR, namespaces,
assemblies, etc. Also, documentation and commenting practices won't be covered
here.
.NET Built-in Types
Primitive Types and Non-Compatible Types
Primitive types: int, float, char, etc.
Non-compatible types: user-defined types, objects, etc.
Implicit and Explicit Type Conversion
Implicit type conversion: automatic type conversion, e.g. int to long
Explicit type conversion: manual type conversion, e.g. int to float
Types and Type Conversion
Types: value types, reference types, etc.
Type conversion: converting one type to another
Variable Scopes and Overflows
Variable scopes: where a variable is accessible, e.g. local vs global variables
Overflows: when a variable value exceeds its capacity, causing data loss
Operators in C#
Arithmetic operators: +, -, *, /, %
Comparison operators: <, >, ==, !=, <=, >=
Logical operators: &&, ||, !
Bitwise operators: &, |, ^, ~, <<, >>
Ternary operator: "condition ? expr1 : expr2"
Null coalescing operator: "expr1 ?? expr2"
Type Conversion and Casting
Convert class: converts between different data types
Parse method: converts a string to a numeric type
Primitive Data Types: Introduction
Introduction to primitive data types
Data Loss and Safe Conversion
Safe type conversion: avoiding data loss during type conversion
Using Convert Class and Parse Method
Using the Convert class and Parse method for type conversion
Note: Other topics not mentioned in these notes include CLR, namespaces,
assemblies, etc. Also, documentation and commenting practices won't be covered
here.