Erste Schritte
This commit is contained in:
53
01_output_comments/01_output_comments.csproj
Normal file
53
01_output_comments/01_output_comments.csproj
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{AE98EF86-FE9F-47A2-AAFE-E7B25AEB9188}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>_01_output_comments</RootNamespace>
|
||||
<AssemblyName>01_output_comments</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
6
01_output_comments/App.config
Normal file
6
01_output_comments/App.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
</configuration>
|
||||
76
01_output_comments/Program.cs
Normal file
76
01_output_comments/Program.cs
Normal file
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
// namesraum
|
||||
namespace _01_output_comments
|
||||
{
|
||||
// Klasse
|
||||
internal class Program
|
||||
{
|
||||
// Methode , Funktion
|
||||
static void Main(string[] args)
|
||||
{
|
||||
/*
|
||||
* Mehrzeilige Kommentare
|
||||
* Noch eine Zeile
|
||||
* bla bla hier passiert folgendes:
|
||||
* - sdfdsf
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// Einzeiliger Kommentar
|
||||
// noch eine Zeile
|
||||
// natürlich ergeben das mehrere Zeilen
|
||||
|
||||
int eineZahl = 5; // Hier steht eine Zahl in einer varibale
|
||||
|
||||
// hier steht der Kommentar davor
|
||||
double percent = 16.3;
|
||||
|
||||
// hiermit wird immer eine ganze Zeile ausgegeben
|
||||
Console.WriteLine("Hallo Welt");
|
||||
Console.WriteLine("Hallo Welt 2");
|
||||
Console.WriteLine("Hallo Welt 3");
|
||||
Console.WriteLine(eineZahl);
|
||||
|
||||
// Ausgabe ohne zeilenumbruch
|
||||
Console.Write("Alles ");
|
||||
Console.Write("in ");
|
||||
Console.Write("einer ");
|
||||
Console.Write("Zeile ");
|
||||
|
||||
// setzen der Hintergrundfarbe
|
||||
Console.BackgroundColor = ConsoleColor.Green;
|
||||
Console.WriteLine("Hallo Green");
|
||||
Console.BackgroundColor = ConsoleColor.Black;
|
||||
Console.WriteLine("Hallo normal");
|
||||
|
||||
// setzen der Schriftfarbe
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine("Hallo in rot");
|
||||
|
||||
// farben resetten
|
||||
Console.ResetColor();
|
||||
|
||||
// löschen des Bildschirms
|
||||
//Console.Clear();
|
||||
|
||||
// Anzeige des Cursors
|
||||
Console.CursorVisible = false;
|
||||
|
||||
// Fenster Titel
|
||||
Console.Title = "Mein Erstes Programm";
|
||||
|
||||
// Ändern der Fenstergröße
|
||||
Console.SetWindowSize(160, 30);
|
||||
|
||||
// Auf tastatureingabe warten
|
||||
Console.ReadKey();
|
||||
}
|
||||
}
|
||||
}
|
||||
33
01_output_comments/Properties/AssemblyInfo.cs
Normal file
33
01_output_comments/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||
// die einer Assembly zugeordnet sind.
|
||||
[assembly: AssemblyTitle("01_output_comments")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("01_output_comments")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2026")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
|
||||
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
|
||||
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||
[assembly: Guid("ae98ef86-fe9f-47a2-aafe-e7b25aeb9188")]
|
||||
|
||||
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
//
|
||||
// Hauptversion
|
||||
// Nebenversion
|
||||
// Buildnummer
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
Reference in New Issue
Block a user