Skip to content

Commit

Permalink
CS001 HelloWorld
Browse files Browse the repository at this point in the history
  • Loading branch information
XuanThuLab committed Aug 8, 2020
1 parent a4a4257 commit 87d3f59
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
Binary file modified .DS_Store
Binary file not shown.
8 changes: 8 additions & 0 deletions CS001_HelloWorld/CS001_HelloWorld.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

</Project>
22 changes: 22 additions & 0 deletions CS001_HelloWorld/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;

namespace CS001_HelloWorld {
class Program // Đây là một ghi chú 1 dòng, đặt ngay sau lệnh C#
{
static void Main (string[] args) {
// Đây là một dòng ghi chú 1 dòng riêng biệt - dòng này không ảnh hưởng đến code

Console.WriteLine ("Xin chào C# NET CORE!");
}

/// <summary>
/// Tính tổng hai số nguyên
/// </summary>
/// <param name="a">số thứ nhất</param>
/// <param name="b">số thứ hai</param>
/// <returns>giá trị a + b</returns>
static int TongHaiSo (int a, int b) {
return a + b;
}
}
}
18 changes: 18 additions & 0 deletions CS001_HelloWorld/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
https://xuanthulab.net/gioi-thieu-c-va-viet-chuong-trinh-cs-dau-tien.html

## Create App Console
```
dotnet new console
```

## Create .gitignore for C# - Net Core
```
dotnet new gitignore
```

## Build, Publush, Run
```
dotnet buid
dotnet publish
dotnet run
```

0 comments on commit 87d3f59

Please sign in to comment.