13Languages
.Net
01 C#
- Basic
csharpfilename.cs12 lines
using System;
namespace h4rithd{ class welcome { static void Main(string[] args) { Console.WriteLine("welcome to h4rithd.com\r\n"); } }}- Complie
bash8 lines
## ------------------| Choose versiondir dir c:\Windows\Microsoft.NET\Framework64\v*dir c:\Windows\Microsoft.NET\Framework\v*
## ------------------| Compliec:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe filename.csdir ! find "filename.exe".\filename.exe- Debug
csharp13 lines
## ------------------| Debug commentsusing System.Diagnostics;static void Main(string[] args){ Debug.Print("Debug");}
## ------------------| Console outputConsole.WriteLine("Debug");System.Console.WriteLine("Debug");
## ------------------| Message BoxMessageBox.Show("message", "title");02 DotNet Core
02.1 Getting Started
bash8 lines
## ------------------| Installation on KaliLinuxwget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.debsudo dpkg -i packages-microsoft-prod.debrm packages-microsoft-prod.debsudo apt-get updatesudo apt-get install -y dotnet-sdk-X.0 ### change the X value as 4,5,6,7,8,9...sudo apt-get install -y dotnet-runtime-X.0 ### change the X value as 4,5,6,7,8,9...sudo apt-get install -y aspnetcore-runtime-X.0 ### change the X value as 4,5,6,7,8,9...02.2 Create Applications
CLI Application
bash10 lines
## ------------------| Create projectdotnet new console -o cliapp
## ------------------| Run the appllicationcd cliappdotnet run
## ------------------| Builddotnet build -c releasedotnet build -c debugASP.NET Core
bash10 lines
## ------------------| Create projectdotnet new webapp --output aspnetcoreapp --no-https
## ------------------| Run the appllicationcd aspnetcoreappdotnet run
## ------------------| Builddotnet build -c releasedotnet build -c debugDLL Application
bash10 lines
## ------------------| Create projectdotnet new classlib -n dllapp
## ------------------| Add Packagesdotnet add package Microsoft.AspNetCore.Components --version 6.0.0dotnet add package Microsoft.AspNetCore.Components.Web --version 6.0.0
## ------------------| Builddotnet build -c releasedotnet build -c debug