CMS and C# basics Flashcards
What does CMS stand for?
Content Management System.
What is a CMS?
CMS is a software that is used to create and modify content on a website.
Give some examples of CMS.
Umbraco, wordpress, wix, sitevision, joomla
What is C#?
It is an object-oriented programming language. It is open source and cross-platform.
What is C# built on?
The .NET platform developed by microsoft
When was C# invented and what other languages influenced it?
C# was invented in 2000 and influenced by C++, Java and other early languages.
Why use C#?
You can build different software applications with one single language.
Name some use cases for C#:
Web applications, API, games, iphone and android apps, windows applications, blockchain.
Name and describe the four components that make up C# syntax:
Usings are namespaces from which we will use classes in our application.
Namespaces are a way of organizing code into different areas.
Classes are descriptions of objects used in the application.
Methods are the executable parts of the application.
There are several built in types in C#. Name and describe the most common types:
String (regular text) Int (whole number) Decimal (number with decimals) Double (number with decimals) Bool (true or false).
There are several ways to merge strings, name them
+ operator
+= operator
string interpolation (similar to JS string interpolation).
Explain the numeric operators
++ (increase by one)
– (decrease by one)
+= (add to existing)
-= (remove from existing)
How do you add items to a list in C#?
Use Add() to add a single item to a list or AddRange() to add multiple items.
Name and describe some useful List methods in C#
Contains() check if the list contains a specific item
Remove() remove a specific item from the list
Clear() clears all items from the list.
What are the two types of conditional operators?
Comparison operators and Logical operators.
Name and describe the comparison operators
== (equals) != (do not equal) > (more than) >= (more than or equal) < (less than) <= (less than or equal).
Name and describe the logical operators
! (not)
|| (or)
&& (and)
Name the types of loops in C#
For loop, While loop and Foreach loop
What is a basic For loop?
for (var i = 0; i < 10; i++) {
}
What is a basic While loop?
var count = 0; while (count < 10) { count ++; }
What is a basic Foreach loop?
List cities = new() { “Jönköping”, “Gothenburg”, “Stockholm” };
foreach (var city in cities)
{
Console.WriteLine(“Current city is {city}”);
}
How do you break a current loop?
Write break; inside the loop.
How do you continue to next item in a loop?
Write continue; inside the loop.
What is LINQ?
LINQ stands for Language INtegrated Query. It is integrated in C# and is used to retrieve data from several different sources.