C# Syntax

C# Syntax

In the previous chapter, we created a C# file called Program.cs, and we used the following code to print “Hello World” to the screen:

Program.cs

using System;

namespace HelloWorld
{
  class Program
  {
    static void Main(string[] args)
    {
      Console.WriteLine("Hello World!");    
    }
  }
}

Result:

Hello World!

 

Continue reading C# Syntax

C++ List

C++ List

A list is similar to a vector in that it can store multiple elements of the same type and dynamically grow in size.

However, two major differences between lists and vectors are:

    1. You can add and remove elements from both the beginning and at the end of a list, while vectors are generally optimized for adding and removing at the end.

 

  1. Unlike vectors, a list does not support random access, meaning you cannot directly jump to a specific index, or access elements by index numbers.

Continue reading C++ List