Module 2

Cards (15)

  • Variables
    Named storage locations that can hold different values during program execution
  • Operators
    Symbols used to perform operations on operands (values or variables)
  • String Manipulation
    Techniques used to modify and extract information from strings
  • C#
    • Object-oriented programming language
    • Program consists of various objects that interact with each other via actions
    • Actions that an object may take are called methods
    • Objects of the same kind are said to have the same type or be in the same class
  • Basic Syntax
    1. using System;
    2. namespace Example Program;
    3. public class Example
    4. public static void Main()
  • namespace
    Keyword used to name your project/program
  • class
    Keyword used for declaring a class, which is a collection of methods, events, variables, objects and more
  • method
    A block of code that defines how an action is performed, associated with a class or object
  • comments
    Used for explaining code, ignored by the compiler
  • Identifiers
    • Names used to identify a class, variable, function, or any other user-defined item
    • Must begin with a letter, can be followed by letters, digits, or underscores
    • Cannot contain embedded spaces or symbols (except underscore)
  • Casting
    Assigning a value of one data type to another type
  • Arithmetic Operators
    Perform mathematical calculations (+, -, *, /, %, ++, --)
  • Relational Operators
    Compare two values, resulting in a boolean value (true or false) (==, !=, >, <, >=, <=)
  • Logical Operators
    Combine and evaluate boolean expressions (&&, ||, !)
  • Assignment Operators
    Assign values to variables (=, +=, -=, *=, /=, %=)