Web Deployment Checklist: Release and Roll Back a Course App

Practical Web Development — Lesson 10 of 10 · Senior A successful deployment command does not prove a course application works. A release is complete when important user journeys work in the target environment and the team can recognize and recover from a bad change. This lesson turns a small course app into a practical release exercise with explicit acceptance and rollback criteria. Describe the change and its risk Suppose a release adds saved course shortlists. Separate the new browser interface, the server endpoint and any database change. Identify what happens when old browser code talks to the new server, and when the previous server version reads newly written data. Rolling back code is not the same as reversing a data migration. Write a short release record before deploying. Use real commit and build identifiers in your own project; the values below are placeholders for the exercise. Change: Add saved course shortlists Build: <immutable build identifier> Owner: <person ...

C# Methods: Parameters, Calls and Return Values

A C# method groups statements under a name so you can call them again. This lesson builds a console program that displays two course messages and calculates a total. Start with our C# Hello World setup guide if you have not created a console project.

Complete method-calling example

Replace Program.cs in a console project with the code below, save it, and run dotnet run from the project directory.

using System;

class Program
{
    static void Main()
    {
        ShowMessage("Welcome to C#");
        ShowMessage("Practice one method at a time");
        int total = AddLessons(3, 2);
        Console.WriteLine($"Total lessons: {total}");
    }

    static void ShowMessage(string message)
    {
        Console.WriteLine(message);
    }

    static int AddLessons(int completed, int planned)
    {
        return completed + planned;
    }
}

Expected output

Welcome to C#
Practice one method at a time
Total lessons: 5

Main runs first. It calls ShowMessage with a string argument. Execution moves into ShowMessage, prints that string, and returns to the next statement in Main. The second call uses the same method with different data. Defining a method does not run it; a call is required.

Parameters and arguments

message is a parameter: the name used inside the method definition. "Welcome to C#" is an argument: the actual value supplied by the caller. A string parameter accepts text. AddLessons has two integer parameters, so the example supplies two whole numbers in the declared order.

Void versus a return value

ShowMessage has return type void: it performs an action without giving a value back. AddLessons returns an int, which Main stores in total. A return statement ends that method call and sends the result to the caller. Printing a number and returning a number are different operations.

Why static appears here

These methods are static because this introductory example calls them from static Main without constructing an object. Instance methods belong to an object and are useful in later object-oriented exercises. Keep the helpers inside Program, at the same brace level as Main.

Practice and debug

  1. Change the two messages and confirm their order in the output.
  2. Call AddLessons with 4 and 0. Predict the result before running.
  3. Add a method named DoubleLessons that takes one int and returns twice its value.
  4. Remove one ShowMessage call. Observe that the definition remains but that message is no longer printed.

If a name is not found, check spelling and capitalization. If an argument cannot convert to int, supply a number rather than quoted text. If braces are mismatched, check that each method is inside the class and outside the other methods.

Original video lesson

Further reading

See Microsoft's C# methods guide for signatures, access modifiers, and additional examples.

Comments

Popular posts from this blog

What Is Multimedia? Examples and a Beginner Course Guide

Internet vs World Wide Web: HTML and Multimedia Explained

VR vs AR: Differences, Uses and Multimedia Design