initial creation

This commit is contained in:
2025-05-20 11:57:43 -04:00
commit c98b612926
8447 changed files with 1862526 additions and 0 deletions
+62
View File
@@ -0,0 +1,62 @@
using System;
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
var a = 10;
var b = 3;
Console.WriteLine("Addition: " + (a + b));
Console.WriteLine("Division: " + (a / b));
// cast to float
Console.WriteLine("Disivion using float: " + ((float)a / (float)b));
Console.WriteLine("Operator Precedence:");
//Operator precedence
var c = 1;
var d = 2;
var e = 3;
Console.WriteLine("Normal precedence: " + (c + d * e));
// Add c & d first then multiply by e
Console.WriteLine("Addition first precedence: " + ((c + d) * e));
Console.WriteLine("Operator comparison:");
//Comparison operators are always true or false
// ! not, > greater than, < less than, equal to ==
Console.WriteLine(c > d); //False
Console.WriteLine(c == d); //False
Console.WriteLine(c != d); //True
Console.WriteLine(!(c != d)); //False
Console.WriteLine("Logical operators:");
//Logical operators &&
Console.WriteLine(e > d && e > c); //True
Console.WriteLine(e > d && e == c); //False
Console.WriteLine(e > d || e > c); //True
Console.WriteLine(!(e > d || e == c)); //False
/*
* used for multi line comment
*/
/* Primitive Types
integer
character
boolean
*/
/* non-primitive types
Arrays
strings
classes
structures
enums
*/
}
}
}
+78
View File
@@ -0,0 +1,78 @@
## Introduction
This is a simple pipeline example for a .NET Core application, showing just
how easy it is to get up and running with .NET development using GitLab.
# Reference links
- [GitLab CI Documentation](https://docs.gitlab.com/ee/ci/)
- [.NET Hello World tutorial](https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/)
If you're new to .NET you'll want to check out the tutorial, but if you're
already a seasoned developer considering building your own .NET app with GitLab,
this should all look very familiar.
## What's contained in this project
The root of the repository contains the out of the `dotnet new console` command,
which generates a new console application that just prints out "Hello, World."
It's a simple example, but great for demonstrating how easy GitLab CI is to
use with .NET. Check out the `Program.cs` and `dotnetcore.csproj` files to
see how these work.
In addition to the .NET Core content, there is a ready-to-go `.gitignore` file
sourced from the the .NET Core [.gitignore](https://github.com/dotnet/core/blob/master/.gitignore). This
will help keep your repository clean of build files and other configuration.
Finally, the `.gitlab-ci.yml` contains the configuration needed for GitLab
to build your code. Let's take a look, section by section.
First, we note that we want to use the official Microsoft .NET SDK image
to build our project.
```
image: microsoft/dotnet:latest
```
We're defining two stages here: `build`, and `test`. As your project grows
in complexity you can add more of these.
```
stages:
- build
- test
```
Next, we define our build job which simply runs the `dotnet build` command and
identifies the `bin` folder as the output directory. Anything in the `bin` folder
will be automatically handed off to future stages, and is also downloadable through
the web UI.
```
build:
stage: build
script:
- "dotnet build"
artifacts:
paths:
- bin/
```
Similar to the build step, we get our test output simply by running `dotnet test`.
```
test:
stage: test
script:
- "dotnet test"
```
This should be enough to get you started. There are many, many powerful options
for your `.gitlab-ci.yml`. You can read about them in our documentation
[here](https://docs.gitlab.com/ee/ci/yaml/).
## Developing with Gitpod
This template repository also has a fully-automated dev setup for [Gitpod](https://docs.gitlab.com/ee/integration/gitpod.html).
The `.gitpod.yml` ensures that, when you open this repository in Gitpod, you'll get a cloud workspace with .NET Core pre-installed, and your project will automatically be built and start running.
@@ -0,0 +1,8 @@
{
"folders": [
{
"path": "."
}
],
"settings": {}
}