Erste Schritte

This commit is contained in:
2026-01-09 12:24:02 +01:00
parent 2d1c3a615e
commit c4d99c4410
10 changed files with 286 additions and 5 deletions

View 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>

View 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>

View 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();
}
}
}

View 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")]

View 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>{4FBF5EE1-EA2B-40D5-B9FA-179E243B60B4}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>_02_variables_and_datatypes</RootNamespace>
<AssemblyName>02_variables_and_datatypes</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>

View 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>

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _02_variables_and_datatypes
{
internal class Program
{
static void Main(string[] args)
{
}
}
}

View 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("02_variables_and_datatypes")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("02_variables_and_datatypes")]
[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("4fbf5ee1-ea2b-40d5-b9fa-179e243b60b4")]
// 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")]

View File

@@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.14.36811.4 d17.14 VisualStudioVersion = 17.14.36811.4 d17.14
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "code_csharp_eses", "code_csharp_eses\code_csharp_eses.csproj", "{DEE964A6-0B3F-4892-9AF0-59C0E4B75F97}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "01_output_comments", "01_output_comments\01_output_comments.csproj", "{AE98EF86-FE9F-47A2-AAFE-E7B25AEB9188}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "02_variables_and_datatypes", "02_variables_and_datatypes\02_variables_and_datatypes.csproj", "{4FBF5EE1-EA2B-40D5-B9FA-179E243B60B4}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -11,10 +13,14 @@ Global
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DEE964A6-0B3F-4892-9AF0-59C0E4B75F97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AE98EF86-FE9F-47A2-AAFE-E7B25AEB9188}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DEE964A6-0B3F-4892-9AF0-59C0E4B75F97}.Debug|Any CPU.Build.0 = Debug|Any CPU {AE98EF86-FE9F-47A2-AAFE-E7B25AEB9188}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DEE964A6-0B3F-4892-9AF0-59C0E4B75F97}.Release|Any CPU.ActiveCfg = Release|Any CPU {AE98EF86-FE9F-47A2-AAFE-E7B25AEB9188}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DEE964A6-0B3F-4892-9AF0-59C0E4B75F97}.Release|Any CPU.Build.0 = Release|Any CPU {AE98EF86-FE9F-47A2-AAFE-E7B25AEB9188}.Release|Any CPU.Build.0 = Release|Any CPU
{4FBF5EE1-EA2B-40D5-B9FA-179E243B60B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4FBF5EE1-EA2B-40D5-B9FA-179E243B60B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FBF5EE1-EA2B-40D5-B9FA-179E243B60B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4FBF5EE1-EA2B-40D5-B9FA-179E243B60B4}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE